ABSTRACT

Virtually all scenes in the real world have shadows, and therefore shadow generation is an indispensable component in computer graphics. Shadows also help us understand the spatial relationships among objects in a scene. This chapter presents the essential ingredients of the shadow mapping algorithm. Numerous shadow algorithms have been proposed over the past decades. The most dominant among them is the shadow mapping algorithm, which was originally proposed by L. Williams [9]. The shadow mapping algorithm is conceptually simple, but its brute-force implementation reveals several problems. The first pass of shadow mapping implements off-screen rendering to produce a shadow map. It is generally called render-to-texture. The classical shadow mapping algorithm has been extended along many directions so as to generate soft shadows in real time. In principle, the extended algorithms compute how much of the light source is visible from each surface point in the penumbra.