|
|
|
|
| |
Alpha Testing on the ATI Rage128
with OpenGL
|
|
|
The Rage128AlphaTest shows how an alpha blended primitive can cause unwanted Z-buffer writes. Figure 1 shows a quad drawn behind an animated texture sequence. Although the alpha blending applied to the texture prevents writes to the color buffer, z-buffer writes still occur causing the blue quad to the depth test several times even though the color buffer was untouched.
| |
|

|

|
Figure 1 - results without
alpha testing.
|
Figure 2 - results with
alpha testing.
|
| |
|
Rage128AlphaTest simply loops though a set of texture maps animating an explosion. After the explosion has been drawn, a blue quad is drawn behind it. It is clearly visible, that without the alpha test rejection, that the z-buffer is forced to record what is in essence an invisible pixel.
- Rage128AlphaTest Controls
- A - Toggle alpha test on or off
- + - Increase alpha test value
- - - Decrease alpha test value
- [ESC] - Quit
Building and Running Rage128AlphaTest
Please see the page Building OpenGL Samples.
Win32 Downloads
Project file, source, executable, and support files (254 kb)
Shared source and include files (31 kb)
|
| |
 |
|
|
|