attenuation field controls how the light source's brightness fades as one moves away from center (position of PointLight) of sphere of influence. For a shape coordinate within this sphere at a distance d from the light's location, the light color brightness at that shape coordinate is determined as follows:
-
attenuatedColor = lightColor/(attenuation[0]+attenuation[1]*d+attenuation[2]*d*d)
-
attenuation[0] controls whether light has a constant brightness within the sphere of illumination.
-
attenuation[1] controls how the light brightness drops off with distance from the light.
-
attenuation[2] controls how the light brightness drops off with the square of distance from the light. (Normal laws of physics)
|