Graphics Reference
In-Depth Information
Let you perform adaptive subdivision based on a variety of criteria such
as size or curvature,
Let you provide coarser models that can be refined in the GPU, giving
you a kind of geometric compression,
Let you apply detailed displacement maps without supplying equally
detailed geometry,
Let you adapt visual quality to the required level of detail,
Let you create smoother silhouetes, or
Let you perform skinning more easily.
Overall this lets you increase the quality of your final images. So why not
just add more geometric detail right in your application program? The best
answer is that tessellation shaders have access
to all the information in the graphics pipe-
line, and thus can adapt to the display situa-
tion. Tessellation shaders are at their very best
when they choose tessellation parameters, not
statically but dynamically, based on the current
transformations, curvatures, screen coverage,
etc.
How does the tessellation shader fit into
our overall shader world? The tessellation
stage is applied between the vertex shader
(Chapter 7) and the next shader stage in the
pipeline, which could be either the geometry
shader (Chapter 12) or the fragment shader
(Chapter 8). This makes intuitive sense, because
the vertex shader modifies vertices individu-
ally with no reference to the primitives they lie
in. The tessellation shader amplifies a single
primitive, and the geometry shader can pro-
vide additional primitives based on the original
primitive. The GLSL view of the graphics pipe-
line is shown here in Figure 13.2 with the tessellation stage highlighted.
When we say “tessellation shader,” we generally mean both the tessella-
tion control shader (TCS) and the tessellation evaluation shader (TES), unless
we say otherwise.
Figure 13.1. A polygon-interpolating mesh tes-
sellation from a GLSL shader.
Search WWH ::




Custom Search