
CHAPTER 3 ■ WORKING WITH 2D IMAGES/TEXTURES IN XNA 3.0
276
Vector4 mirrorPlaneCoeffs = new Vector4(mirrorPlane.Normal, mirrorPlane.D);
Vector4 clipPlaneCoeffs = Vector4.Transform(-mirrorPlaneCoeffs, invCamMatrix);
clipPlane = new Plane(clipPlaneCoeffs);
}
First you calculate this inverse-transpose matrix. Next, you retrieve the four coefficients of
your mirror plane, defined in 3D. You map them to clip space by transforming them with the
inverse-transpose matrix, and you use the resulting coefficients to create the clipping plane.
Note the – sign indicates which side of the plane should be culled away. This all has to
do with the direction of ...