Edge antialiasing — continued


  • Parhelia — The Parhelia's unique Fragment AA method does edge-only antialiasing with lots of samples—sixteen, to be exact. Fragment AA does a Z-buffer check to determine which pixels are on polygon edges, then segregates edge pixels from the rest of the scene. Non-edge pixels are rendered normally, while edge pixels are sent to a fragment buffer and rendered using 16X ordered grid supersampling (see the pattern image at right). Although Fragment AA doesn't use a rotated or quasi-random sampling pattern, it's very effective, because sample size is more important than sample pattern. 16X AA is hard to beat.

    This method is theoretically more efficient than multisampling. Multisampling avoids multiple texture reads for non-edge pixels, but those pixels are still processed by the algorithm. Fragment AA operates only on edge pixels, so Parhelia can sample more often for those pixels with little performance penalty. However, Fragment AA sometimes causes visual artifacts and other compatibility problems, so Matrox included a 4X ordered-grid supersampling fallback mode. Because supersampling is less efficient, the 4X mode is slower than 16X FAA.

    Oddly, the Parhelia drivers won't respond to Direct3D API calls for 2X or 4X AA, so users have to manually choose 16X FAA or 4X ordered-grid AA.


    Parhelia — No AA, 4X AA, 16X AA, diff between No AA and 4X AA, diff between No AA and 16X AA FAA at 16X does a very nice job cleaning up the near-vertical lines in our sample image. You can see from the "diff" images how the 4X supersampled mode modifies quite a few pixels, while 16X Fragment AA touches only edge pixels. Although this method is distinct from multisampling, its results are generally similar.

  • Radeon 9700 Pro — The Radeon 9700 Pro improves on the 8500 by shedding supersampling for multisampling. This change should help performance immensely. The 9700 supports 2X, 4X, and 6X modes. Beyond that, ATI has included a number of innovations in the 9700's antialiasing hardware; most should help image quality and performance.

    Notably, the Radeon 9700 retains the programmability of the 8500 in terms of sampling patterns, but as I understand it (at least with current drivers, and probably over the long term) the 9700 doesn't vary sample points from pixel to pixel in a quasi-random fashion like the 8500 does. Still, the chip's programmed sampling pattern is a little bit wilder than a simple rotated grid. The example at right is based on a sampling pattern shown in an ATI whitepaper, but I'm not sure of the 9700's exact pattern in current drivers. Obviously, the pattern shown is for 6X AA modes.

    Also, unlike the Radeon 8500, the 9700 can make use of Z-buffer compression in conjunction with antialiasing, which should help performance.

    On the image quality front, the Radeon 9700 employs a simple but effective new twist: gamma correct blending. When the chip blends sampled color values together, it applies a gamma curve. Gamma correction at various points in the pixel pipeline is encouraged in the DirectX 9 spec. Because graphics chips must operate in a gamma colorspace, this technique only makes sense.

    The pictures below illustrate the impact of gamma correction. The first, from an ATI whitepaper, shows how applying a gamma curve ensures smooth gradients on antialiased edges. The second, generated in a paint program using a screenshot from Serious Sam SE, shows how incrementing color values with a simple brightness filter washes out colors, while a gamma-correct filter preserves contrast. This second image isn't strictly about antialiasing, but it demonstrates clearly the impact of accounting for gamma.


    Gamma-correct blending maintains smooth gradients. Source: ATI.


    Brightness washes out colors, while gamma preserves contrast.

    The Radeon 9700 includes provisions to address one of the weaknesses of multisampling: textures with transparency. Multisampling handles antialiasing at the edges of polygons well, but it doesn't address "edges" inside of textures with transparency. Unfortunately, these provisions appear to require application-level support, and current apps don't provide it.


    Radeon 9700 — No AA, 2X AA, 4X AA, 6X AA, diff between No AA and 6X AA Nevertheless, the Radeon 9700's antialiasing is excellent. Thanks to its irregular sampling pattern and gamma correction, the Radeon 9700's 6X AA mode looks at least as good as Matrox's 16X FAA to my eye—and much better than a GeForce4 Ti. Of course, that perception may be colored by the fact that the Radeon 9700's frame rates in 6X AA are much higher than the Parhelia's in 16X FAA, and frame rate is an important component of effective antialiasing. Without fluid motion, the AA effect doesn't work as well.