next up previous contents index
Next: Computing Up: Linear Interpolation of Attenuation Previous: Linear Interpolation of Attenuation   Contents   Index


Computing $ \zeta $

Solving for $ \zeta_{D,\tau (t)}$ is straightforward. Plugging in the linear form of $ \tau (t)$ into Equation 1.3, we get the following.

$\displaystyle \zeta_{D,{\tau }_{\,\mathrm{b}},{\tau }_{\,\mathrm{f}}}$ $\displaystyle = e^{-\int_0^D \left( {\tau }_{\,\mathrm{b}} \left(1-\frac{t}{D}\right) + {\tau }_{\,\mathrm{f}} \frac{t}{D} \right) dt}$    
  $\displaystyle = e^{-\left. \left( {\tau }_{\,\mathrm{b}} \left(t - \frac{t^2}{2D}\right) + {\tau }_{\,\mathrm{f}} \frac{t^2}{2D} \right) \right\vert _0^D}$    
  $\displaystyle = e^{-\left( {\tau }_{\,\mathrm{b}} \left(D-\frac{D}{2}\right) + {\tau }_{\,\mathrm{f}} \frac{D}{2} \right)}$    
  $\displaystyle = e^{-\frac{D}{2}\left({\tau }_{\,\mathrm{b}} + {\tau }_{\,\mathrm{f}}\right)}$ (57)

Because Equation 1.6 resolves to such a simple expression, we can compute it directly in programmable fragment units (of DirectX 9 class graphics hardware [61]) with few instructions.



Kenneth D Moreland 2004-07-16