next up previous contents
Next: Distant Light Sources Up: Light Source Shaders Previous: Light Source Shaders   Contents


Ambient Light Sources

If a light source does not have an illuminate or solar statement, it is a non-directional ambient light source. An ambient light source supplies light of the same color and intensity to all points on all surfaces. The source code for the standard shader ambientlight is quite simple:

light ambientlight(
    float intensity = 1;
    color lightcolor = 1)
{
    Cl = intensity * lightcolor;
}

The result of the ambientlight shader is placed in the global variable Cl, which is the output of all light sources.



Jan Walter 2004-02-09