The light shader physical_light models physically
correct light sources. As for ideal point lights, the light
intensity falls off with the inverse square of the distance. If
physical correctness is not important, this falloff can be
modified by changing exponent; in general the falloff is
1/e^d where e is the falloff exponent and d
is the distance between the light source and the illuminated
point. For directional lights there is no falloff since the light
rays are parallel.
color "physical_light" (
- specifies the light energy. Since this shader is
physically correct, its energy is distance-dependent and not
normally in the range 0...1. This is normally a copy of the light
source energy, but keeping it separate makes it possible to
adjust direct and indirect illumination separately.
- is the cosine of the opening angle of the inner
solid cone, if the shader is attached to a spot light source.
- is for optimization: if the illumination is
less than threshold, the illumination can be discarded and no
shadow rays need to be cast. The default is 0.
- is for flat area lights only (rectangle and
disc): the default cosine illumination distribution is made more
narrow by taking cosine to the cos_exp power. The default is
The shader reads the direction, spread, and exponent
parameters directly from the light source.
Copyright © 1986, 2013