Graphics Reference
In-Depth Information
Sample Storage
Color
Storage
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Figure 36.22: Depiction of the storage allocated for a single pixel under 16x
CSAA [You06]. The large box on the left depicts the coverage samples. Each color sam-
ple contains a 2-bit integer that indexes into the four slots in the color table depicted by
the smaller box on the right. When a fifth unique color is required, one of the four color
samples is replaced. Thus, CSAA is heuristic and cannot guarantee correctness when many
different surfaces color a pixel. (Courtesy of NVIDIA)
high-resolution coverage samples unique to them, and while there are available
slots. When all of the slots are filled, some fragments are replaced. Thus, a pixel
with 16 coverage samples and four slots may be forced to drop up to 12 fragments
that actually should affect the pixel value. However, for primitives of screen-space
area greater than one pixel it is often the case that only a few fragments will have
nonzero coverage at a pixel. So, although CSAA is lossy, it often succeeds at rep-
resenting fine-grained coverage using less storage than MSAA and the A-buffer,
and with a low shading rate.
Analytic coverage historically predates CSAA, but can be thought of today as
the limit of the CSAA process. Rather than taking many discrete samples of frag-
ment coverage ignoring occlusion, one might simply compute the true coverage
of a pixel by a fragment from the underlying geometric intersection. In the case of
an instantaneous pinhole camera and simple surface geometry, this is a straight-
forward measure of the area of a convex polygon. The ratio of that area to the area
of the pixel is the partial coverage of the pixel by that surface.
In the context of rasterization, for some primitives this computation can be
amortized over many pixels so that computing analytic partial coverage informa-
tion adds little cost to the rasterization itself. Primitives for which efficient partial
coverage rasterization algorithms are known include lines [Wu91, CD05a] and cir-
cles [Wu91], which naturally extend to polygons and disks by neglecting one side.
Modern hardware rasterization APIs such as OpenGL and Direct3D include
options to compute partial coverage for these primitives as part of the rasteriza-
tion process. The implementation details vary. Sometimes the underlying process
involves taking a large number of discrete samples rather than computing the true
analytic result. Since there is a fixed precision for the result, the difference is irrel-
evant once enough samples are taken.
Analytic coverage has the advantage of potentially significantly higher preci-
sion than multiple discrete samples, with no additional memory or shading cost
per pixel. It is often used for rasterization of thin lines and for polygons and curves
in 2.5D presentation graphics and user interfaces.
 
Search WWH ::




Custom Search