Graphics Reference
In-Depth Information
The difference between primitives rasterized with and without MSAA active is
shown in Figure 3.66. You can clearly see the difference in how the edges of the primitive
are significantly smoother in the MSAA version (shown on the left) than the non-MSAA
version (shown on the right).
3.10.4 Rasterizer Stage Pipeline Output
Fragment Generation
Throughout the rasterizer stage discussion, we have seen each of the processes that are
used to convert a primitive into a set of fragments. Several different tests, such as culling,
are intended to reduce the number of primitives that need to be processed. In addition,
there are also several tests, such as clipping, viewport transform, and the scissor test, that
potentially reduce the number of fragments generated by a primitive. It appears that there
have been significant amounts of effort put into reducing the number of fragments gener-
ated by the rasterizer stage. Why would so many tests be aimed at reducing the output from
this stage?
The reason is that the rasterizer stage has a 1-to-many relationship between its input
and its output. For each primitive submitted to the rasterizer as input, many fragments are
potentially generated. Due to this general data amplification, any processing performed af-
ter this point in the pipeline will be executed many more times than processing performed
earlier. Therefore, it is clearly better to eliminate unused or unnecessary primitives before
they are split into fragments, and it is also better to eliminate fragments in the rasterizer
stage before they need to be processed later on. This idea can also be extended to general
algorithm design, as well. When you have a choice between performing a calculation be-
fore or after rasterization, it is typically more efficient to perform the calculation before
generating many fragments. In many cases, even if the calculations done before the raster-
izer are only approximations of those that would be done afterward, this can produce a
large efficiency gain at a minimal loss of image quality.
Fragment Data
With this in mind, we can consider what type of data stream is produced by the rasterizer
stage. We have discussed in detail how each fragment is generated when its location within
a render target is covered by a primitive. When it is determined that a location is covered by
a primitive, each of the attributes that are passed into the rasterizer are interpolated, using
the center of the pixel as the input to the interpolation function. 3 2
The depth value is also
3 2
For MSAA rasterization, the sample locations may be used for interpolation as well.
Search WWH ::




Custom Search