Aliasing is the bane of the digital domain. In the early days of the personal computer, jagged edges and blocky graphics were accepted by the user simply because not much could be done to correct them. Now that hardware is faster and displays are higher in resolution, there are several anti-aliasing techniques that can smooth edges to achieve a more realistic scene.
OpenGL supports anti-aliasing that operates at the level of lines and polygons as well as at the level of the full scene. This chapter discusses techniques for full scene anti-aliasing (FSAA). The three anti-aliasing techniques in use today are multisampling, supersampling, and alpha channel blending:
Multisampling defines a technique for sampling pixel content at multiple locations for each pixel. This is a good technique to use if you want to smooth polygon edges.
Supersampling renders at a much higher resolution than what's needed for the display. Prior to drawing the content to the display, OpenGL scales and filters the content to the appropriate resolution. This is a good technique to use when you want to smooth texture interiors in addition to polygon edges.
Alpha channel blending uses the alpha value of a fragment to control how to blend the fragment with the pixel values that are already in the framebuffer. It's a good technique to use when you want to ensure that foreground and background images are composited smoothly.
The ARB_multisample extension defines a specification for full scene anti-aliasing. It describes multisampling and alpha channel sampling. The specification does not specifically mention supersampling but its wording doesn't preclude supersampling. The anti-aliasing methods that are available depend on the hardware and the actual implementation depends on the vendor. Some graphics cards support anti-aliasing using a mixture of multisampling and supersampling. The methodology used to select the samples can vary as well. Your best approach is to query the renderer to find out exactly what is supported. OpenGL lets you provide a hint to the renderer as to which anti-aliasing technique you prefer. Hints are available starting in Mac OS X v10.4 as renderer attributes that you supply when you create a pixel format object.
Guidelines
General Approach
Hinting for a Specific Anti-Aliasing Technique
Setting Up Full Scene Anti-Aliasing
See Also
Last updated: 2008-06-09