
152 4. Basic visualization
Projection plane
Spotlight angle
Plane of the spotlight buffer
p
P
L
Viewpoint
y
z
x
Figure 4.40: A scene with spotlight illumination.
one of the cells in the shadow map associated with the imaginary viewpoint at
P
L
. That cell records the distance of the nearest point in the scene from the
imaginary camera (and spotlight), say d
min
.
Here then is ou r test to see if p lies in shadow: if the distance from p to P
L
is greater that d
min
then point p lies in shadow.
This procedure works because the s potlight shines on a limited area, and so
its cone of illumination is bounded and ther efor e the ps eu d o camera’s field of view
can be set