next up previous contents
Next: 11.4.2.2 Shadow Volume Trade-offs Up: 11.4.2 Shadow Volumes Previous: 11.4.2 Shadow Volumes

11.4.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.



David Blythe
1999-08-06