Specifications
3D Graphics Accelerators
919
by real-life fighter pilots—is placed in front of dynamically changing graphics (such as scenery, other
aircraft, sky detail, and so on). In this example, the area of the screen occupied by the cockpit wind-
shield frame is not re-rendered. Only the area seen through the “glass” is re-rendered, saving time and
improving frame rates for animation.
Z-Buffering
A closely related technique is Z-buffering, which originally was devised for computer-aided drafting
(CAD) applications. The Z-buffer portion of video memory holds depth information about the pixels
in a scene. As the scene is rendered, the Z-values (depth information) for new pixels are compared to
the values stored in the Z-buffer to determine which pixels are in “front” of others and should be ren-
dered. Pixels that are “behind” other pixels are not rendered. This method increases speed and can be
used along with stencil buffering to create volumetric shadows and other complex 3D objects.
Environment-Based Bump Mapping and Displacement Mapping
Environment-based bump mapping (standard starting in DirectX 6) introduces special lighting and
texturing effects to simulate the rough texture of rippling water, bricks, and other complex surfaces. It
combines three separate texture maps (for colors, for height and depth, and for environment—including
lighting, fog, and cloud effects). This creates enhanced realism for scenery in games and could also be
used to enhance terrain and planetary mapping, architecture, and landscape-design applications. This
represents a significant step beyond alpha blending. However, a feature called displacement mapping
produces even more accurate results.
Special grayscale maps called displacement maps have long been used for producing accurate maps of the
globe. Microsoft DirectX 9 supports the use of grayscale hardware displacement maps as a source for accu-
rate 3D rendering. GPUs that fully support DirectX 9 in hardware all support displacement mapping. The
Matrox Parhelia series, which supports some DirectX 9 features, also supports displacement mapping.
Texture Mapping Filtering Enhancements
To improve the quality of texture maps, several filtering techniques have been developed, including
MIP mapping, bilinear filtering, trilinear filtering, and anisotropic filtering. These techniques and sev-
eral others are explained here:
■ Bilinear filtering. Improves the image quality of small textures placed on large polygons. The
stretching of the texture that takes place can create blockiness, but bilinear filtering applies a
blur to conceal this visual defect.
■ MIP mapping. Improves the image quality of polygons that appear to recede into the distance by
mixing low-res and high-res versions of the same texture; a form of antialiasing.
■ Trilinear filtering. Combines bilinear filtering and MIP mapping, calculating the most realistic
colors necessary for the pixels in each polygon by comparing the values in two MIP maps. This
method is superior to either MIP mapping or bilinear filtering alone.
Note
Bilinear and trilinear filtering work well for surfaces viewed straight-on but might not work so well for oblique angles (such
as a wall receding into the distance).
■ Anisotropic filtering. Some video card makers use another method, called anisotropic filtering, for
more realistically rendering oblique-angle surfaces containing text. This technique is used when
a texture is mapped to a surface that changes in two of three spatial domains, such as text
found on a wall down a roadway (for example, advertising banners at a raceway). The extra cal-
culations used take time, and for that reason, it can be disabled. To balance display quality and
performance, you can also adjust the sampling size: Increase the sampling size to improve dis-
play quality, or reduce it to improve performance.
Chapter 15
16 1738 ch15 7/30/04 10:31 AM Page 919