| |
Gloss Mapping on the ATI Rage128
with Direct3D
|
The R128GlossMap sample program uses the ATI Rage128 to carry out two-pass gloss mapping, which is similar to environment mapping, except with variable reflectivity on the reflective surfaces. Figure 1 shows R128GlossMap in action, comparing specular environment mapping to gloss mapping.
|
|
Figure 1 - specular vs. gloss mapping.
|
|
R128GlossMap takes two passes to create the gloss mapping lighting effect. In the first pass, the specular environment map is rendered onto the destination surface. Meanwhile, the example has stored the reflectivity of the vase's base texture in the alpha channel of that texture, and for the second pass, we add on the base texture modulated by the vertex color to the destination color modulated by the base texture's alpha channel. This gives the effect of a gloss mapped object that results from the following lighting equation:
Result = Base*DiffuseLight + EnvironmentMap*GlossMap
In addition, there is also a second object drawn with a single pass to show plain specular environment mapping.
- R128GlossMap Controls
-
- F1 - Help
- F2 - Select Driver/Device/Mode
- +/- - Tilt object forward/back
- [ALT]+[ENTER] - Toggle fullscreen/windowed
- [ESC] - Quit
Downloads
DirectX 6 project file, source, executable, and support files
|
| |