I’m tweaking the settings in DiRT 2 and I’m presented with these choices (in order) for multisampling:
- 2x MSAA
- 4x MSAA
- 8x MSAA
- 8x CSAA
- 16x CSAA
- 8x QCSAA
Using the nVidia Control panel I’m presented with
- 8x CSAA
- 16x CSAA
- 16xQ CSAA
- 32x CSAA
I assume those without text on the nVidia panel are probably MSAA.
The naive guess would be bigger numbers are visually better. But then MSAA, CSAA and QCSAA come in to play (presumably different methods of performing AA) and confuse matters by not being in the right order.
For example is 8x / 8x MSAA “better” than 8x CSAA somehow? Otherwise why would it be further down the list on the nVidia panel? And is 8x QCSAA “better” than 16xCSAA as per the order in DiRT2?
In terms of image quality, performance and any other quirks,
what are the differences between the various types of AA?
I’m not asking about the algorithmic/implimentation differences; that’s probably off-topic anyway.
This is a great question because other than “is AA on or off?” I hadn’t considered the performance implications of all the various anti-aliasing modes.
There’s a good basic description of the three “main” AA modes at So Many AA Techniques, So Little Time, but pretty much all AA these days is MSAA or some tweaky optimized version of it:
Super-Sampled Anti-Aliasing (SSAA). The oldest trick in the book – I list it as universal because you can use it pretty much anywhere: forward or deferred rendering, it also anti-aliases alpha cutouts, and it gives you better texture sampling at high anisotropy too. Basically, you render the image at a higher resolution and down-sample with a filter when done. Sharp edges become anti-aliased as they are down-sized. Of course, there’s a reason why people don’t use SSAA: it costs a fortune. Whatever your fill rate bill, it’s 4x for even minimal SSAA.
Multi-Sampled Anti-Aliasing (MSAA). This is what you typically have in hardware on a modern graphics card. The graphics card renders to a surface that is larger than the final image, but in shading each “cluster” of samples (that will end up in a single pixel on the final screen) the pixel shader is run only once. We save a ton of fill rate, but we still burn memory bandwidth. This technique does not anti-alias any effects coming out of the shader, because the shader runs at 1x, so alpha cutouts are jagged. This is the most common way to run a forward-rendering game. MSAA does not work for a deferred renderer because lighting decisions are made after the MSAA is “resolved” (down-sized) to its final image size.
Coverage Sample Anti-Aliasing (CSAA). A further optimization on MSAA from NVidia [ed: ATI has an equivalent]. Besides running the shader at 1x and the framebuffer at 4x, the GPU’s rasterizer is run at 16x. So while the depth buffer produces better anti-aliasing, the intermediate shades of blending produced are even better.
This Anandtech article has a good comparison of AA modes in relatively recent video cards that show the performance cost of each mode for ATI and NVIDIA (this is at 1920×1200):
---MSAA--- --AMSAA--- ---SSAA--- none 2x 4x 8x 2x 4x 8x 2x 4x 8x ---- ---------- ---------- ---------- ATI 5870 53 45 43 34 44 41 37 38 28 16 NVIDIA GTX 280 35 30 27 22 29 28 25
So basically, you can expect a performance loss of..
no AA → 2x AA
no AA → 4x AA
There is indeed a visible quality difference between zero, 2x, 4x and 8x antialiasing. And the tweaked MSAA variants, aka “adaptive” or “coverage sample” offer better quality at more or less the same performance level. Additional samples per pixel = higher quality anti-aliasing.
Comparing the different modes on each card, where “mode” is number of samples used to generate each pixel.
Mode NVIDIA AMD -------------------- 2+0 2x 2x 2+2 N/A 2xEQ 4+0 4x 4x 4+4 8x 4xEQ 4+12 16x N/A 8+0 8xQ 8x 8+8 16xQ 8xEQ 8+24 32x N/A
In my opinion, beyond 8x AA, you’d have to have the eyes of an eagle on crack to see the difference. There is definitely some advantage to having “cheap” 2x and 4x AA modes that can reasonably approximate 8x without the performance hit, though. That’s the sweet spot for performance and a visual quality increase you’d notice.