Graphics Reference
In-Depth Information
3.6.2 Tessellator Stage State Configuration
The tessellator stage is not directly configured by the application, but by the attributes
specified in the hull shader program (which is configured by the application). The available
set of configurations is the collection of function attributes mentioned in the "Hull Shader"
section. Since most of these function attributes are used to configure the tessellator stage
(even though they are specified in the hull shader stage), we will take a closer look at what
they are intended to do.
Domain Attribute
We begin with the domain attribute. We have already mentioned that the tessellator stage
does not actually tessellate control patches, but tessellates a domain object. The type of
domain specified in this attribute can have one of three values: an isoline, tri, or quad.
At a high level, we can say that the tessellator stage determines points within this domain
that need to be realized by the domain shader stage. This attribute is mandatory, since the
type of domain is also used to validate the number of tessellation factors produced by the
patch constant function.
Partitioning Attribute
The next attribute is the partitioning attribute. This can take on one of four values: integer,
fractional_even, fractional_odd, or pow2. Each value identifies a different scheme
for how to split up the specified domain. As we will see in more detail in Chapter4, "The
Tessellation Pipeline," there is a significant difference in the chosen tessellation points for
each of these partitioning schemes. This attribute is also mandatory.
Output Topology Attribute
Once the specified domain is split up according to the specified partitioning scheme, the
tessellator stage also needs to know how to assemble primitives from these individual
points. The available options for this attribute are triangle_cw, triangle_ccw, and line.
This attribute is also mandatory; otherwise, the primitives produced by the tessellation
stage could have significantly different results than intended. For example, if the incorrect
triangle winding were produced, the rendered geometry would appear inside out!
Max Tessellation Factor Attribute
The final attribute that configures the tessellation stage is maxtessfactor. This attribute
is an optional hint to the driver about the maximum possible amount of data amplifica-
tion. Using this upper limit to the tessellation factors, the driver can efficiently preallocate
enough memory to receive the results of the tessellation operations.
Search WWH ::




Custom Search