Chapter Objectives
After reading this chapter, you'll be able to do the following:
Blend colors to achieve such effects as making objects appear translucent
Smooth jagged edges of lines and polygons with antialiasing
Create scenes with realistic atmospheric effects
The preceding chapters have given you the basic information you need to create a computer-graphics scene; you've learned how to do the following:
Draw geometric shapes
Transform them so that they can be viewed from whatever perspective you wish
Use display lists to maximize your program's efficiency
Specify how the geometric shapes in your scene should be colored and shaded
Add lights and indicate how they should affect the shapes in your scene
Now you're ready to get a little fancier. This chapter discusses three techniques that can add extra detail and polish to your scene. None of these techniques is hard to use - in fact, it's probably harder to explain them than to use them. Each of these techniques is described in its own major section:
"Blending" tells you how to specify a blending function that combines color values from a source and a destination. The final effect is that parts of your scene appear translucent.
"Antialiasing" explains this relatively subtle technique that alters colors so that the edges of points, lines, and polygons appear smooth rather than angular and jagged.
"Fog" describes how to create the illusion of depth by computing the color values of an object based on distance from the viewpoint. Thus, objects that are far away appear to fade into the background, just as they do in real life.
OpenGL Programming Guide