Graphics Reference
In-Depth Information
Figure 13.6 . The division levels for the isolines output interpolation.
Issues in Setting Tessellation Levels
GLSL will let you set any tessellation levels you like for the inner and outer
levels of your patches, but you need to pay atention to your overall scene
as you set these levels. One reason is aesthetic—you want to set your levels
high enough to achieve a satisfactory image, but no higher. There is a more
important reason, however. If you have two pieces of geometry with patches
that share an edge, using different outer tessellation levels for the edge in the
different patches will clearly lead to cracks where the edges of the patches
meet. Keeping the tessellation levels the same is only a necessary condition, of
course; you must also ensure that the computations on the patches in the TES
are the same so that the edges align.
Examples
In this section we'll look at four examples: one with output using an isolines
patern, one with output using a quads patern, one with output using a tri-
angles patern, and one that implements point-normal (PN) triangles. These
will show you how many of the tessellation shader operations fit together and
should help you get started on your own work. Each example is set up to work
with glman , so a .glib file is presented along with the shader files; it should be
straightforward to see how to pass the same information to the shaders from
an application.
Search WWH ::




Custom Search