![]() |
To determine the shadows, a scene is rendered from the perspective of the light using a Z-buffer. This Z-buffer, called the shadow map, identifies the distance of the object closest to the light along each direction. |
![]() |
The scene is then rendered a second time from the perspective of the viewer/camera. As each object is rendered, its location is compared to the shadow map. If the rendered point is farther away from the light source than the value in the shadow map, the point is considered to be in shadow. |