Graphics Reference
In-Depth Information
the shading function to the shader programmer—it only reduces aliasing due to
geometric edges. For a shader that computes the color of a flat, matte surface
with uniform appearance, this is a good approximation. In contrast, a shader that
samples specular reflections off of a bumpy surface may exhibit significant under-
sampling because the shading function rapidly varies in space.
The second problem is that MSAA requires storage for a separate shade at
each pixel. Thus, it has the same memory bandwidth and space cost as SSAA,
even though it often reduces computation substantially.
Third, MSAA works best for primitives that are substantially larger than a
pixel, and for pixels with many samples. If a mesh is tessellated so that each
primitive covers only a small number of samples, then many shading computations
are still needed.
Fourth and finally, MSAA does not work with the shading step of deferred
shading algorithms. Deferred shading separates visible surface determination
from shading. It operates in two passes. The first pass computes the inputs to
the shading function at each sample and stores them in a buffer. The second pass
iterates over each sample, reads the input values, and computes a shading value for
the sample. When there are more samples than pixels, a final “resolve” operation is
needed to filter and downsample the results to screen resolution. MSAA depends
on amortizing a single shading computation over multiple samples. Under forward
shading, that is possible because the coverage information for a single fragment
is in memory at the same time that shading is being computed. Because deferred
shading resolves coverage for all fragments before any shading occurs, the infor-
mation about which samples within a pixel corresponded to the same fragment has
been lost at shading time. Thus, one is faced with the two undesirable options of
rediscovering which samples can share a shading result or of shading all samples
by brute force.
Shading caches and decoupled shading [SaLY + 08, RKLC + 11, LD12] are
methods currently under active research for adding a layer of indirection to capture
the relationship between shading and coverage samples under a bounded memory
footprint. The goal of this line of research is to combine the advantages of MSAA
and deferred shading without necessarily creating an algorithmic framework that
resembles either.
Coverage sampling antialiasing (CSAA) [You06] combines the strengths of
the A-buffer and MSAA. It separates the resolution of coverage from both the
resolution of shading and the resolution of the depth buffer. The key idea is that
within each pixel there is a large set of high-resolution samples, but those sam-
ples are pointers to a small set of unique color (and depth, and stencil, etc.) val-
ues rather than explicit color values. For example, Figure 36.22 shows 16 sample
locations within a pixel that reference into a table of four potentially unique color
values.
CSAA allows a more accurate estimate of the area of the fragment within
the pixel than the estimate of the occlusion of a fragment by other fragments.
As each fragment is rasterized, CSAA computes a single shade per pixel, many
binary visibility samples ignoring occlusion, and a few binary visibility samples
taking occlusion into account. A small, fixed number of slots (usually four) are
maintained within each pixel that are similar to entries in an A-buffer's list. Each
slot stores the high-resolution coverage mask, shade value, and depth (and sten-
cil) sample for a single fragment. Fragments are retained while there are some
 
Search WWH ::




Custom Search