Graphics Reference
In-Depth Information
Figure 3.58. Multiple viewports within a single render target, which allows rasterizing of geometry to a
particular region of the render target.
There are two different ways that the desired viewport can be selected by the applica-
tion. If the input signature to the rasterizer stage (as determined by the declared output from
the previous stage) contains the SV_ViewportArrayIndex system value semantic, then this
value is used to select from the currently bound array of viewports. If this system value se-
mantic is not present in the input signature, then the system defaults to the viewport located
at index 0. Therefore, if only a single viewport is bound and no further manipulation of the
viewport is needed, the developer can simply exclude SV_ViewportArrayIndex from the
rasterizer input to select the primary viewport. Figure 3.58 demonstrates the use of multiple
viewports and how they can be employed to select multiple regions for rasterization.
After the viewport transformation has been completed, the vertex position is split into
its X- and 7-coordinates, which are used to identify the region of the render target that is
covered by a primitive, and its Z-coordinate, which is a depth value that is used later in the
depth buffering system to determine the visibility of individual fragments.
Rasterization
The final operation in the rasterizer stage is to perform the actual rasterization of the primi-
tives that reach this point in the pipeline. The primary purpose of the rasterizer is to convert
the geometric data that it receives into discretely sampled data that approximates the geo-
metric data within the render target. This can be thought of as a sampling process, where
the geometry can be considered as continuous data, while the output fragments are a digital
representation of the geometry at regularly spaced intervals. A number of sample primi-
tives are shown in Figure 3.59.
The rasterization process consists of two different tasks, fragment generation and
attribute interpolation. We will discuss each of these items individually, and then
Search WWH ::




Custom Search