Next: 20.2.2 Spotlight Effect
Up: 20.2 Lighting Equations
Previous: 20.2 Lighting Equations
The attenuation factor is defined to be:

where
- d = distance between the light's position and the vertex
-
GL_CONSTANT_ATTENUATION
-
GL_LINEAR_ATTENUATION
-
GL_QUADRATIC_ATTENUATION
If the light is directional, the attenuation factor is 1.