|
|
|
|
| |
Emboss Bump Mapping on the ATI Rage128
and Rage128 Pro with Direct3D
|
The R128DX7EmbossMap sample program uses multi-texturing to perform the popular emboss style of bump mapping. The technique uses a single-pass on the Rage 128 and Rage128 Pro to give the results below. Figure 1 shows R128DX7EmbossMap in action.
|
|
|
Figure 1
|
Figure 2 - height map
used in example.
|
|
- These are the steps used in R128DX7EmbossMap to implement bump mapping:
-
- Shift the height map relative to itself by adjusting the texture coordinates of each vertex based on the incident angle of the light at that vertex.
- Subtract the shifted version of the height map from the unshifted version.
- Use the result from the previous step to modulate the lighted texture of the primitive.
- R128DX7EmbossMap Controls
-
- F1 - About
- F2 - Select Driver/Device/Mode
- [ALT]+[ENTER] - Toggle fullscreen/windowed
- [ENTER] - Toggle Go/Stop
- Space Bar - Single Step
- T - Toggle texture mapping on/off
- E - Toggle emboss mapping on/off
- M - Toggle Modulate/Modulate2X
- A - Toggle Add-signed/Add-signed2X
- Left mouse drag - Move light source in x and y
- [ESC] - Quit
Downloads
DirectX 7 project file, source, executable, and support files
|
| |
 |
|
|
|