Tech Report CS-03-19
Fast, Practical and Robust Shadows
Morgan McGuire, John F. Hughes, Kevin T. Egan, Mark Kilgard, and Cass Everitt
We present a set of algorithms for rendering shadows using the stencil buffer and shadow volume geometry. It can achieve greater performance than previous methods by applying a series of techniques for culling, clipping, and simplifying shadow volume geometry. The performance of many 3D games is currently limited by pixel fill rate, and the clipping and culling techniques effectively reduce the fill rate consumption of shadow rendering by a constant factor. Scientific and engineering 3D applications can instead be performance limited by the hardware vertex processing rate and have unused fill rate. For a shadow caster with O(s) possible silhouette edges and O(f) faces, the simplification techniques reduce the triangle count needed for shadow determination for two common cases from O(f) to O(s), reducing the number of vertices processed. Finally, we use a vertex program and indexed vertex array to reduce the memory bandwidth requirement from 36 to 6 bytes per triangle on programmable hardware. The effectiveness of these techniques depends highly on the geometry of the 3D scene and the graphics hardware available. For example, the simplification method trades vertex rate for fill rate and will slow down applications that are fill rate bound.