Chapter 12: Video Cards^273
Point sampling This texturing technique uses one texel to establish the texture
of a triangle. While it is the easiest and fastest technique and uses the lowest
bandwidth of the texturing techniques in use, it results in poor image quality
with a lot of aliasing (jagged edges and missing texture) elements.
Texture mapping This step applies a picture in 2D format over 3D objects to
create levels of detail and texture, or to create a perspective change, such as an
object moving closer or further away.
Z-buffering As the pixels of a 3D image are rendered, the accelerator does
not know which pixel is to be displayed first. Z-buffering encodes each pixel
with a Z-value that is used to sequence the pixels.
Shading
After each triangle is rendered with its basic color, shading is applied to indicate the effect
any light sources calculated during the setup phase have on it. The shading applied adds a
bit of realism to the rendered polygon. Here are a few of the shading techniques applied:
Flat shading This technique calculates a single light intensity and applies
it to the entire triangle. The benefit of flat shading is that it requires very little
resources from the processor. Its disadvantage is that it produces poor image
quality with sudden changes of light intensity between triangles.
Gouraud shading This is the most commonly used shading technique. It
calculates a different light intensity for each point (vertex) of the triangle and
then averages the light intensity between the points.
Phong shading This shading technique is done completely with software
and requires a great deal of processor time. A different light intensity may
be calculated for each pixel in the triangle, resulting in an extremely realistic
image. The name comes from its developer, Phong Bui-Tuong.
Fog
As a 3D object moves further away from the viewer, the 3D video card cannot draw it into
infinity. If an object moves beyond the limit at which the video accelerator can no longer
draw the object, it just disappears from view. How far away an object can move in rela-
tion to the viewer is dependent on the processing capabilities of the processor. This also
means that objects will suddenly appear when moving towards the viewer once they
reach the distance limit.
Fog is a trick to avoid the sudden appearance and disappearance of objects. An object
movingawayortowardthevieweratadistanceiscoveredwithfog,whichblendsthepixels
of the object with a certain fog color when it is further away. As the object moves over the
drawing limit, it is drawn but made invisible by a cover of fog. When it moves closer, the fog
color fades away and the object comes into view without suddenly popping up. Fog is the
3D graphics version of a fade in and fade out.