Graphics Reference
In-Depth Information
typically provided by the hull shader program, which are typically either copied from the
input control points or extracted from them. In addition, any material properties not read
out of a resource would normally be included in the control points. These may include per
control point colors, shininess, or material identifiers, just to name a few.
In contrast, the patch constant function's output is somewhat more predefined. It must
produce the appropriately sized set of tessellation factors for use by the tessellator stage.
These are written to output attributes with the system value semantic of SV_TessFactor
and SV_InsideTessFactor. In addition, any patch constant information is also passed as
output attributes. These attributes are not sent to the tessellator stage, since it doesn't per-
form custom processing, but are instead passed directly to each invocation of the domain
shader program as input attributes.
3.6 Tessellator
The tessellator stage is the fixed function pipeline stage of the tessellation system. It is
located somewhere between the hull shader stage and the domain shader stage, and this
location defines the source and destination of its input and output. When the tessellation
stages are used in the rendering pipeline, they are all used together—they cannot operate
individually. As such, the tessellator stage plays an important role in implementing any
tessellation algorithm. The location of the tessellator stage is highlighted in Figure 3.23.
The job of the tessellator stage is to convert the requested amount of tessellation,
which is determined in the tessellation factors of the hull shader stage patch constant func-
tion, into a group of coordinate points within the current "domain." The domain in which
these points are generated can be an isoline, triangle, or a quad—whichever is specified in
the domain function attribute of the hull shader program. This should be somewhat surpris-
ing, since the operation described above makes no use of control points or control patches.
Instead, the tessellator stage simply generates a set of points that indicate where vertices
should be created within the specified domain. These points are later passed to the domain
shader stage, where they are rejoined with the control points produced by the hull shader
Figure 3.23. The tessellator stage.
Search WWH ::




Custom Search