|
|
|
|
| |
Using the stencil buffer on the ATI
Rage128 with Direct3D
|
|
|
The R128Dissolve3D sample program shows how the stencil buffer may be used to dissolve from one real-time 3D scene into another using different dissolve patterns. Three different dissolve patterns are demonstrated: random noise, a tiled pattern, and a plasma image. Figure 1 shows R128Dissolve3D doing a dissolve using the plasma pattern.
|

|
Figure 1
|
|
- R128Dissolve3D works as follows:
-
- Fill the stencil buffer with the desired dissolve
pattern.
- Set the stencil buffer to keep existing values
on stencil pass.
- Dissolve sequence: loop from 0 to 255 in the
desired step.
- At the start of each iteration, set the stencil
reference to the loop counter.
- Set the stencil function to D3DCMP_LESS and
draw the first scene.
- Set the stencil function to D3DCMP_GREATEREQUAL
and draw the second scene.
- Swap the front and back buffers. NOTE: Do NOT
clear the stencil buffer at the start of each
new frame.
- R128Dissolve3D Controls:
-
- F1 - Help
- F2 - Select Driver/Device/Mode
- D - Initiate scene dissolve
- C - Cycle through dissolve patterns
- [ALT]+[ENTER] - Toggle fullscreen/windowed
- [ESC] - Quit
Downloads
DirectX 6 project file, source, executable, and support files
|
| |
 |
|
|
|