Graphics Reference
In-Depth Information
Due to the importance of determining which surface primitives are visible and which
are not, it is critical to ensure that the outputtopology setting is compatible with the con-
figurations for culling used in the rasterizer stage. Once the coordinate points have been
selected, the primitive information is essentially just a list that contains either two refer-
ences (for lines) or three (for triangles) to the appropriate coordinate points.
3.6.4 Tessellator Pipeline Data Flow Outputs
Once the tessellation process has been completed for a particular invocation of the tessel-
lator stage, the results are passed through a system value semantic to the domain shader
stage. The SV_Domain Location system value provides one domain coordinate point to the
domain shader stage at a time, and the domain shader program is invoked once for each of
these output points. Before the points are processed in the domain shader, they are simple
coordinates in the current domain.
Since the primitive topology information created for the freshly tessellated geometry
is not used by the domain shader stage, it is conceptually passed beyond the domain shader
stage to the geometry shader stage. The geometry shader stage is aware of complete primi-
tives, and hence can make use of the information. One important note to keep in mind is
that there is no primitive topology with adjacency information available for creation in
the tessellator stage. This means that when the tessellation stages are active, the geometry
shader stage can't receive a primitive type with adjacency. This limits the available algo-
rithms that can be implemented in the geometry shader program, but typically, any calcu-
lations that would require adjacency information can be incorporated into either the hull
or domain shader programs, since they do have various levels of adjacency information
available to them. If the geometry shader stage is not active, the primitive information and
vertices created in the domain shader stage are passed directly to the rasterizer stage, where
they further processed and used to generate pixels.
3.7 Domain Shader
The domain shader stage is the final stop in the tessellation system. It is a programmable
pipeline stage, which receives input from both the hull shader stage and the tessellator
stage, and produces output vertices, which can be further processed by the rasterization
stages later in the pipeline. With this responsibility, the domain shader stage can be con-
sidered the heart of the tessellation algorithm, which is set up by the hull shader and by the
granularity of the produced geometry set up by the tessellator stage. The location of the
domain shader stage is highlighted in Figure 3.28.
Search WWH ::




Custom Search