next up previous contents
Next: 11.3.2.2 Light Volumes Up: 11.3.2 Shadow Volumes Previous: 11.3.2 Shadow Volumes   Contents

11.3.2.1 Multiple Light Sources

The algorithm can be extended to handle multiple light sources. For each light source, repeat the second pass of the algorithm, clearing the stencil buffer to ``zero'', computing the shadow volume polygons, and rendering them to update the stencil buffer. Instead of replacing the pixel values of the unshadowed scenes, choose the appropriate blending function and add that light's contribution to the scene for each light. If more color accuracy is desired, use the accumulation buffer.

The accumulation buffer can also be used with this algorithm to create soft shadows. Jitter the light source position and repeat the steps described above for multiple light sources.



2001-01-10