|
|
|
|
| |
Light Mapping on the ATI Rage128
with Direct3D
|
The R128LightMap sample is an example of using multi-texturing to do lightmaps. Lightmaps use a texture as the lighting component of a primitive. This allows you to use per pixel lighting without the expense of the extra calculations. The spotlight in this example is a lightmap that gets textured on top of the photo texture, using DX6 multi-texturing to modulate the lightmap with the other texture. Figure 1 shows R128LightMap in action.
|
|
Figure 1
|
|
R128LightMap is a very simple implementation of lightmapping, but gives you the basic steps. For a more elaborate implemenatation, you will need to project the cone of the spotlight onto your primitives, and find the texture coordinates of the lightmap at the vertices of your primitives.
- R128LightMap Controls
-
- F1 - Help
- F2 - Select Driver/Device/Mode
- [ALT]+[ENTER] - Toggle fullscreen/windowed
- Arrow keys - Move spotlight around
- + or - - Increase or decrease the spotlight radius
- [ESC] - Quit
Downloads
DirectX 6 project file, source, executable, and support files
|
| |
 |
|
|
|