next up previous contents
Next: C..2.2 Spotlight Effect Up: C..2 Lighting Equations Previous: C..2 Lighting Equations   Contents

C..2.1 Attenuation Factor

The attenuation factor is defined to be:

\begin{displaymath}\hbox{attenuation factor} \; = {1 \over {{k_{c}} + {k_{l}d} + {k_{q}d^2}}}\end{displaymath}

where
$d =$ distance between the light's position and the vertex
$k_{c} =$ GL_ CONSTANT_ATTENUATION
$k_{l} =$ GL_ LINEAR_ATTENUATION
$k_{q} =$ GL_ QUADRATIC_ATTENUATION
If the light is directional, the attenuation factor is 1.



2001-01-10