shadows can offer a nice effect, but are limited in several ways
to planar receivers
models the shadow casting problem as a visibility
in this case, visibility is determined from the light source
mapping classifies points follows:
- Illuminated: visible from the light source
shadow: not visible from the light
method employs a shadow map
which is a depth rendering of the scene from the perspective of the light
pixel in the shadow map stores a distance value from the scene point to the
[Akenine-Moeller et al.: Real-time Rendering]
when the scene is rendered, each pixel’s distance to the light is compared to
the value in the shadow map.
the distances are equal, the fragment is illuminated. However,
if the distance is larger than the value in the shadow map, the fragment is in
example, below, for a point on C visible to the camera, the distance to the
light source is zc. However, for this pixel, the shadow map has a
smaller distance coming from surface B.
Therefore we know the fragment is in shadow.
mapping allows self-shadows and shadows on arbitrary shapes.
mapping works well but accuracy is limited to the resolution of the buffer used
to generate the shadow map.