Graphics Reference
In-Depth Information
program to give a physical meaning to the points. Understanding how the tessellator stage
operates, and why it is implemented in this counterintuitive way, will provide a solid foun-
dation upon which to build tessellation algorithms.
3.6.1 Tessellator Stage Pipeline Inputs
To understand the tessellator stage, we will begin by considering the type of data that flows
into it. The vertex shader stage receives assembled vertices/control points from the input
assembler stage, and the hull shader stage receives control patches created from the output
control points from the vertex shader stage (along with primitive information from the
input assembler). This basic concept is depicted in Figure 3.24.
In both of these cases earlier in the pipeline, the data that flows into the stage is
processed in some fashion and then passed to the next stage. This is not the case in the
tessellator stage. Instead, it receives the tessellation factors produced by the hull shader
stage patch constant function. These factors are simple floating point numbers that indicate
how heavily to tessellate the different parts of the domain object. Regardless of how the
tessellation factors are calculated in the hull shader stage, if two control patches produce
the same set of tessellation factors, they appear identical to the tessellator stage. Since the
tessellator stage cannot distinguish between the two sets of input, it will produce precisely
the same output in both situations.
Strictly speaking, all of the other pipeline stages would produce the same output
if given two sets of identical input. The reason the tessellator is unique is that it is more
likely to encounter the same input values from multiple different control patches, due to
the "flattening" of the input data to simple factors. This is a profound difference from the
other pipeline stages. This will be important to consider as we further explore the type of
processing performed in the tessellator stage.
Figure 3.24. A representation of the data flowing through the pipeline.
Search WWH ::




Custom Search