For
a scene with multiple lights, one loops over all the light sources, and
computes a colour for each light. The
resulting colour will be the sum.
Note
that colours are
clamped to
the range [0, 1]
- When passed from the vertex shader to the
fragment shader.
- Before being written to the colour
buffer.