Search Unity

Inverse square falloff for lights

Discussion in 'General Graphics' started by Vector-Informatik-GmbH, Jan 15, 2015.

  1. Vector-Informatik-GmbH

    Vector-Informatik-GmbH

    Joined:
    May 22, 2014
    Posts:
    2
    I try to calculate a realistic light intensity reflected by a surface. My problem is to understand exactly how the intensity of lights is calculated. (Not the reflection but the falloff over distance.)
    Physically the illumination intensity at any distance is: Intensity(distance) = Intensity(0) / distance^2

    I tested it with a diffuse surface, a point light and a spotlight, deferred and forward rendering. The position of the light was changed, distance between camera and surface was constant. Finally I checked the color values of the rendered image.
    The result was a 1/distance behavior instead of 1/distance^2.

    Can anyone give me the equations of light intensity over distance used by unity?
    Which settings will result in inverse square falloff?