Graphics Reference
In-Depth Information
by calling the ID3DllDeviceContext: :ResolveSubresource() method. Performing this
resolve combines the values of the individual subsamples into a single value, resulting in
a texture suitable for being displayed on the screen, or for being sampled using normal
shader sampling methods. The filter applied when performing the resolve is specific to the
hardware and driver, and to the quality level specified for the render target. However, in
most cases, a box filter is used. For a box filter, all subsamples are weighted equally, mak-
ing it a simple arithmetic average of the subsample values.
3.13 High-Level Pipeline Functions
After stepping through the entire pipeline, stage by stage, we have covered a significant
amount of functionality in great detail. In fact, there is so much information presented in
this chapter that it can be overwhelming to consider all of the different types of calculations
that can be performed. Therefore, we will provide a few ways to consider the functions of
each stage from a somewhat higher level, in an attempt to clarify how they are typically
used. These groupings are generalized based on typical usage, but they don't necessarily
reflect any type of requirement. After all, the pipeline's flexibility allows for very creative
and unusual uses, so these are merely presented as a starting point for the reader to build
from.
3.13.1 Vertex Manipulations
The early stages of the pipeline are generally used to build and manipulate the vertices
that represent the geometric surfaces that will be rendered. This includes construction of
vertices by the input assembler, as well as the individual per-vertex operations that are per-
formed by the vertex shader. At the lowest level, these two stages perform the most basic
operations on the input geometry that are seen throughout the pipeline. Because of this
close proximity to the original input geometry, it is quite natural to make modifications to
the geometry early in the pipeline. Traditionally, the transformation matrices are applied in
the vertex shader, which is essentially manipulating the geometric properties of the model.
In general, since both of these stages operate at a per-vertex level, they will most
likely be executed the least during a single pipeline execution. For each draw call, the
input assembler will produce each vertex of the model, and will set up each primitive for
further processing later in the pipeline. From these two streams, the vertex shader will
operate only once per vertex. In contrast to the later stages in the pipeline, the input as-
sembler and vertex shader perform their calculations at a relatively low frequency. While
the input assembler is a fixed function stage, the vertex shader is programmable and can be
Search WWH ::




Custom Search