
CHAPTER 3 ■ WORKING WITH 2D IMAGES/TEXTURES IN XNA 3.0
271
■Note In the case of a mirror, you want to use the same Projection matrix to render to the custom target
as you use to render your normal scene. If, for example, the angle of your normal Projection matrix is wider
than the matrix of the render target, the coordinates you will calculate in your shaders will all be mixed up.
Now that that has been saved, you clear the back buffer of the screen and render your
scene as seen by the normal camera, in other words, using the normal View matrix:
//render scene + mirror as seen by user to screen
graphics.GraphicsDevice.Clear(Color.Tomato);
RenderScene(fpsCam.ViewMatrix, ...