DirectX SDK |
This topic pertains only to application development in C++. See Direct3D Immediate Mode Visual Basic Samples.
The ClipMirror sample shows how to use clip planes to implement a planar mirror.
Source: (SDK root)\Samples\Multimedia\D3dim\Src\ClipMirror
Executable: (SDK root)\Samples\Multimedia\D3dim\Bin\ClipMirror.exe
Press F1 to see available commands, or choose from the menu.
The scene is reflected in a mirror and rendered in a second pass. The corners of the mirrors, together with the camera eye point, are used to define a custom set of clip planes so that the reflected geometry appears only within the mirror's boundaries.