Graphics Reference
In-Depth Information
Figure 3.46. A triangle that has been rasterized.
is referred to as rasterization, and it maps individual primitives to a format appropriate
for storage in a texture resource. The result of rasterization is to produce a number of
fragments that approximate the original geometry. This is the first step toward generating
individual pixel data that will contribute to an output image. Figure 3.46 shows what a
rasterized triangle looks like.
In addition to performing the rasterization operation, the rasterizer stage also per-
forms a number of additional operations before fragments are generated. The first opera-
tion is primitive culling, which eliminates primitives that will not contribute to the out-
put rendering due to their location within clip space. By eliminating primitives prior to
rasterization, the overall number of primitives to process is reduced, which increases the
efficiency of the stage.
The second operation is the clipping of primitives. This process "clips" primitives to
the portion of clip space that can affect the rendered output. This essentially cuts up primi-
tives that are partially in the viewable area into primitives that are completely within it. The
portion outside of this region is not needed since it won't produce fragments that can affect
the output render target. The clipped primitives are then mapped to the active viewport.
The viewport is a structure that describes a subset of the current render target to receive the
processed primitives. Finally, the scissor test is applied during the rasterization process.
This essentially allows the application to specify a rectangular region where rasterization
is allowed to occur. Any generated fragments that fall outside of the scissor rectangle are
discarded instead of being passed further down the pipeline. This also improves overall
pipeline efficiency when only a subregion of the rasterized output will be used.
With all of these operations to perform, the rasterizer stage contributes a large amount
of functionality to the processing of pipeline data. It can have a profound impact on the
performance of the pipeline as a whole, and hence it is important to understand how all
of the processes mentioned above work, and how to influence their operation. The output
from the rasterizer stage sets up the rest of the pixel-based pipeline stages, which makes
this a data amplification point.
Search WWH ::




Custom Search