Game dev
Saved & recent

Attenuation

Also called: falloff

Related terms: inverse square law, light range

How a light gets dimmer with distance. In the real world brightness drops with the square of the distance: twice as far, a quarter of the light.

That curve never quite reaches zero, so engines add a range past which the light is cut off. Each light then affects only nearby objects, which keeps the cost down.

brightness = power / (distance * distance)

Further reading
LearnOpenGL: light casters and attenuation
1 2 3 4 5 6 0 25 50 75 100 distance r / r₀ relative irradiance (%) 100% 25% 6.25% inverse-square falloff range cutoff
Gold shows E(r)/E(r₀) = (r₀/r)² for unobstructed point-light illumination at normal incidence, with r₀ > 0. Twice the distance receives 25% of the reference irradiance; four times receives 6.25%. Blue dashes show an illustrative hard range R = 4r₀: the same falloff for r < R, then zero for r ≥ R. Physical falloff stays positive; engines may instead taper smoothly near the range.

View in the full Game dev collection