Post by Thomas
I'm struggling to understand the essential difference between multisampling
and supersampling but I'm getting the impression that multisampling makes
more compromises in order to maintain frame-rates. Will supersampling at 2x2
(for example) give superior image quality than 4x multisampling, or is it
Multisampling (multisample antialiasing, MSAA) is an approximated form of
supersampling. Specifically, the fragment colour is only calculated for a
single location within each fragment, while the depth test, stencil test
and insideness test are performed for multiple locations.
This means that, unlike supersampling, multisampling doesn't increase the
number of times the fragment shader is executed (unless the fragment
shader calculates gl_FragDepth), and doesn't increase the number of
OTOH, it doesn't do anything to solve aliasing within the interior of the
primitive. It only antialiases at edges; either the actual edges of
primitives or when fragments are clipped by depth or stencil tests. Note
that it doesn't antialias "edges" resulting from the alpha channel.
MSAA correctly handles polygons which share an edge, whereas traditional
polygon antialiasing (GL_POLYGON_SMOOTH) tends to let the background bleed
through. MSAA doesn't require the primitives to be depth-sorted.
Supersampling may give better results (it should never be worse), but the
performance cost is likely to be far greater.