tf-mirror renders geometry about a reflected viewpoint. The Embedded Frame Buffer (EFB) is copied to a texture format. The texture is then applied to a quad to imitate a planar mirror.
The reflection can be generated using a smaller viewport than the actual scene. This speeds rendering but results in blurrier reflections. The demo uses GXProject to find the bounding box of the reflector in screen space, and only that part of the EFB is copied.
| Functions | Parameters | Description |
MTXReflect |
m |
Generated matrix. |
| p | Point on reflector. | |
n |
Normal to reflector. | |
GXProject |
All | Used with the reflected model-view matrix to project the mirror in screen space. |
GXGetProjectionv |
p | Used to get the current projection (matrix) to pass to GXProject. |
GXGetViewportv |
vp | Used to get the current viewport to pass to GXProject. |
GXSetViewportv |
vp | Used to restore the viewport. |
GXGetTexBufferSize |
All | Computes the size of the texture buffer needed for the copied reflection texture. |
START exits the test. The Control Stick rotates the mirror. The C Stick moves the mirror. The A Button switches to orthogonal projection mode. The X Button controls the reflected viewport scale. The B Button enables rotation of the reflected image.

$REVOLUTION_SDK_ROOT/dvddata/gxTests/tf-02.tpl
2006/03/01 Initial version.
CONFIDENTIAL