Keywords: main

Next: 1.12 Texture Mapping and Up: 1. Functionality Previous: 1.10 IES and Eulumdat Profiles.1

# 1.11 Shadow Maps

Shadow mapping is a technique that generates fast approximate shadows. It can be used for fast previewing of models or as an alternative to the more accurate (but also more costly) ray tracing based approach in scenes where accurate shadows are not required. Shadow maps are particularly efficient when a scene is rendered several times without changes in the shadows (for example an animation where only the camera is moving).

A shadow map is a fast depth buffer rendering of the model as seen from a light source. This means that each pixel in a shadow map contains information about the distance to the nearest object in the model in a particular direction from the light source. This information can be used to compute shadows without using shadow rays to test for occluding objects. The shadow computation is based only on the depth information available in the shadow maps. For fast previewing of scenes, shadow maps can be used in combination with scanline rendering to produce fast approximate renderings with shadows -- without using any ray tracing.

Two different kind of shadows can be produced with shadow maps: sharp and soft (blurry) shadows. Sharp shadows are very fast, and depending on the resolution of the shadow map they will approximate the result produced with simple ray tracing. Soft shadows are produced by distributing one or more samples in a region of the shadow map. This technique produces soft shadows everywhere and is not as accurate as the ray tracing based approach for computing soft shadows but is much faster.

Shadow maps always assume that shadow-casting objects are fully opaque, and never call shadow shaders..

Next: 1.12 Texture Mapping and Up: 1. Functionality Previous: 1.10 IES and Eulumdat Profiles.1