A Reflective World
The GeForce 256 provides support for real-time accurate reflections and specular lighting effects via cube environment mapping. Since cube environment mapping is already supported by both DirectX 7 and OpenGL, developers can incorporate it's benefits into their games.
Environment mapping is is an efficient technique, compared to sphere mapping, to compute reflections in a computer generated 3D world. With sphere mapping, as viewpoints change, the sphere map is normally recalculated to coincide the with new viewpoint. However, cube environment maps are viewpoint independent and do not need to be recalculated in scenes with static surroundings.
The following two images represent a spherical environment map. The first image shows the correct reflection that is created in the sphere. However, the second image shows the same sphere map with a change in viewpoint. In this example, the viewer should not be able to see both the pool in the sphere and in the primary scene.
Cube Environment Mapping
Using a simplistic description, cube environment mapping captures reflections through the use of a cube map shape. The cube map consists of 6 projected faces that surround an object. Using standard camera modes, reflection models can be created accurately without having to be updated when the viewpoint moves. If the developer requires to capture motion or changes in suppounding maps, the hardware acceleration of the GeForce 256 will update the map per frame as needed.
Cube Environment Map Shape
Cube Map Surrounds Object
Cube Environment Map Sphere
Cube Maps And Specular Lighting
Since cube environment mapping is a new form of texture access, it can also be used in conjunction with specular lighting to enable a wide variety of new graphical effects. Furthermore, specular lighting lookups are done in the cube map on a per pixel basis.
For example, the doughnut on the left uses per pixel lighting through the use of cube mapping. The doughnut on the right uses vertex lighting.