Game Development Reference
In this section, we describe a trick that exploits the view frustum clipping
planes that already exist for every rendered scene. 1 Normally, every geometric
primitive is clipped to the six sides of the view frustum by the graphics hardware.
Adding a seventh clipping plane that represents the reflective surface almost al-
ways results in a redundancy with the near plane, since we are now clipping
against a plane that slices through the view frustum further away from the cam-
era. Instead, we look for a way to modify the projection matrix so that the con-
ventional near plane is repositioned to coincide with the reflective surface, which
is generally oblique to the ordinary view frustum. Since we are still clipping only
against six planes, such a modification gives us our desired result at absolutely no
C be the plane shown in Figure 5.21, having coordi-
nates specified in camera space, to which we would like to clip our geometry.
The camera should lie on the negative side of this clipping plane, so we can as-
. The plane C will replace the ordinary near plane of the view
frustum. As shown in Table 5.2, the camera-space near plane is given by the sum
of the last two rows of the projection matrix M , so we must somehow satisfy
We cannot modify the fourth row of the projection matrix because perspective
projections use it to move the negation of the z coordinate into the w coordinate,
Figure 5.21. The near plane of the view frustum is replaced with the arbitrary plane C .
1 For a more detailed analysis, see Eric Lengyel, “Oblique Depth Projection and View
Frustum Clipping”, Journal of Game Development , Vol. 1, No. 2 (Mar 2005), pp. 5-16.
Search Nedrilad ::