Zum 3DCenter Forum

Multisampling Anti-Aliasing: A Closeup View

May 22, 2003 / by aths / page 7 of 8 / translated by 3DCenter Translation Team

   Quality vs. supersampling: Can there be only one?

While multisampling calculates texture colours only per pixel, supersampling delivers automatic texture oversampling, which results in an effect similar to anisotropic filtering. At least in theory. In practise this is only true for GeForce cards. On Radeos, most drivers back-"correct" the texture detail via MIP-Map-LOD, to gain a bit of performance. With GeForce cards on the other hand the full quality advantage for textures is realised. On a Voodoo card it was necessary to alter the LOD control manually in order to get higher texture detail.

The "true" anisotropic filtering (short "AF"), is able to achieve equal quality with significantly less rendering power, thus the combination MSAA + AF is prefered. But compared to supersampling, multisampling has a disadvantage with textures when the so called "alpha testing" comes into play.

The alpha test can turn texture samples marked as translucent truly invisible, by abandoning the entire pixel after the alpha test and not writing it into the framebuffer. Especially older games make use of this technique. Edges within the texture emerge; supersampling smoothes that, multisampling of course doesn't. The texture doesn't get worse though, it just stays the way it would be without anti-aliasing.

When talking about textures, the term "Nyquist boundary" has to be mentioned as well. This boundary allows to calculate, which texture resolution has to be chosen for the image to be as sharp as possible without shimmering. In short, a ratio of "1 filtered texel per pixel" is ideal. But for AF more filtered texels per pixel are needed, and these have to be sampled from higher resolution MIP textures then.

Thanks to adaptive oversampling from higher resolution mipmap levels, AF reduces the bluriness of textures at sharp angles. The alpha texels are also sampled from the higher resolution textures. But in that case the alpha test is performed only once for the whole pixel, not per AF subsample. This is a violation of the Nyquist criterion and results in horrible flickering. The flickering would be less with AF disabled, but then its positive effects would obviously be lost as well.

Supersampling does not solve this problem, but the quality is clearly improved: On one hand normal textures get an AF effect, and still can get better when AF is activated. But more importantly: the flickering with alpha textures is reduced because internally the entire alpha texture is sampled in smaller steps. Instead of just transparent pixels, supersampling now also permits transparent subpixels. This advantage is partly nullified again though, because due to the subtler internal texture sampling, it is also sampled from a higher resolution MIP-level (if that's available). But in practise, such a frame is still more comfortable to look at with supersampling than with multisampling, where especially branched treetops flicker tend to stronlgy flicker.

With alpha blending (instead of alpha testing) the flickering is more of a minor issue. Alpha blending allows smooth transitions between visible and tranparent. For example, a texel can be marked "20% visible". In this case the colour is sampled from the texture, and the data for this spot is read from the framebuffer. Then the two colours are mixed accordingly and the result is written back into the framebuffer. But there's a problem, alpha blending only works properly when rendering from back to front. That's because the objects in the back have to be visible through the ones in the front, not vice versa. But this back-to-front rendering order is disadvantageous with regards to efficiency (generally it is tried to render from front to back). Due to static rendering order, additional wrong results can occur from certain angles, as in Max Payne: from below the lattice stairs look fine, from above the snow shines through where bars are supposed to be.

As long as the rendering order takes into account which textures are treated with alpha blending, this method is superior in quality compared to alpha testing. But it requires more work from the graphics card and CPU.

From a quality point of view, the best solution appears to be a combination of supersampling and alpha blending. Unfortunately, all modern cards only offer supersampling (if at all) in the inefficient oversampling mode. This burns more performance than quality is generated. Hence, the multisampling/oversampling combinations offered by nVidia since GeForce3 are not recommendable. Except the case, when unused power is available without the option to invest it in higher resolutions. That the 4xS mode still reached popularity is mainly due to the generally bad 4x MSAA performance of GeForce3 and 4.

On the right 4xS: 4 subpixels, 2 subtexels. This mode is superior to 4x MS, but far from ideal.

For the sake of completeness also the 4xS-mode of GeForce3:

4xS was available via tweak programs long before it was announced officially for GeForce4.

Just as a side note, GeForce4 MX is only capable of 2x MSAA, 4x MSAA isn't possible. The 4x mode is simply 2x2 oversampling. 4xS, as a combination of 2x MSAA and 1x2 oversampling is still available though.

Time to draw a conclusion.

comment this article in our english forum - registration not required Zurück / Back Weiter / Next

nach oben