2
\$\begingroup\$

I have always asked myself this, especially about x4 or x8 anti-aliasing. It seems that over the years, the algorithm has remained the same but needs more power than before due to improved game graphics.

Most disturbingly, some games look the same at x4 and x8, but perform worse at x8!

What makes anti-aliasing algorithms so computationally demanding?

\$\endgroup\$
2
\$\begingroup\$

It all comes down to memory bandwidth with proper anti-aliasing techniques (e.g. MSAA, SSAA, CSAA). While 8x SSAA and 8x MSAA have identical storage requirements (8x), the workload between the two algorithms is quite different. Multisample anti-aliasing adds some intelligence to the rasterization stage to reduce the number of fragments that have to be shaded, thus reducing the computational expense of anti-aliasing. However, the covered samples generated during rasterization still have to be written and averaged and this eats through a tremendous amount of memory bandwidth.

Newer image processing techniques (e.g. FXAA, MLAA) approach the problem from an entirely different perspective. They do not seek to solve the fundamental problem that leads to aliasing in the first place (inadequate sample frequency), instead they keep initial rendering as simple as possible and "fix it in post" using a complicated shader. Given the trend in hardware to increase compute power quicker than memory bandwidth and advances in display resolution, these compute-intensive approaches definitely have sticking power. Nevertheless, I have a hard time calling them anti-aliasing, as all they really do is mask aliasing after the fact.

If you are speaking of an anti-aliasing approach whose quality is measured in terms of sample rate, then the algorithm is of the memory hungry variety first discussed. The newer shader-based techniques have a myriad of implementation-specific properties that you can tune, and this is why a game that uses something like FXAA will sometimes offer vague "Low", "Medium", "High", etc. quality settings but nothing quantitative.

\$\endgroup\$
1
\$\begingroup\$

I know that MSAA renders the scene at a higher resolution and then downsamples it to make nice pixels. Simply, the graphics card is trying to render double or quadruple the screen resolution, and calculating more pixels is just slower. You can find more info at http://en.wikipedia.org/wiki/Multisample_anti-aliasing

TXAA though, combines MSAA with some past-frame blending, which means you don't get the flicker that MSAA sometimes gets on very thin architecture. It seems to be nvidia specific though.

\$\endgroup\$
  • \$\begingroup\$ You're thinking of SSAA, by the way. MSAA adds coverage calculation to the rasterization step in order to write as few samples as possible. Moreover, MSAA also separates sampling from fragment processing. To say that MSAA renders the scene at a higher resolution and then down-samples it is inaccurate, because the pixel/fragment shader is not evaluated for each discrete sample. This is why MSAA does not address shader aliasing (things like specular highlights or texture aliasing), it is really only good for aliasing introduced during rasterization (e.g. "jaggies"). \$\endgroup\$ – Andon M. Coleman Apr 25 '14 at 15:15
0
\$\begingroup\$

Well in XNA it samples the scene for pixel data a number of times and uses the data to interpolate the colour around the lines. So it is quite demanding on the GPU to do each frame, but there are newer types of AA(MSAA, TXAA etc) which are more efficient but i am unsure how they work.

Edit: Tordin pointed out my original answer was incorrect

\$\endgroup\$
  • 1
    \$\begingroup\$ Im not sure about this, Which technique redraws the scene multiple times? \$\endgroup\$ – Tordin Apr 24 '14 at 7:43
  • \$\begingroup\$ Ill have to edit my answer when i get home dont know what i was thinking aa only samples the pixels multiple time my mistake \$\endgroup\$ – Jackson Apr 24 '14 at 8:07
  • \$\begingroup\$ Ah okay, i thought i missed some new technique there or something. \$\endgroup\$ – Tordin Apr 24 '14 at 9:55
  • \$\begingroup\$ MSAA is hardly new. It has been around almost as long as programmable fragment processing (~2000). \$\endgroup\$ – Andon M. Coleman Apr 25 '14 at 15:08
-2
\$\begingroup\$

http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm simply because anti-aliasing algorithm have high cost

\$\endgroup\$
  • 3
    \$\begingroup\$ -1: this answer doesn't explain anything, and the Wu line algorithm has nothing to do with 3D polygon rendering used in games. \$\endgroup\$ – Nathan Reed Apr 24 '14 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.