Graphics Reference
In-Depth Information
Figure 13.13. A tessellated surface (left) with outer tessellation level 10, showing facets
along the edges, and (right) with outer tessellation level 30, showing a smooth edge.
The output of these shaders using glman is shown in Figure 13.12.
An important question about tessellation levels is how to use them for
making effective images. When a patch edge is visible, you may find that a tes-
sellation level that is perfectly adequate for a patch interior may look clumsy
on the edge. We illustrate this in Figure 13.13, where the same patch shown in
Figure 13.12 is examined in more detail at an edge where there is rapid change.
Here the value of a larger outer tessellation level is clear from the appearance
of the edge.
In the image on the left, the lower-left corner has outer tessellation level
ten, which is not enough and so the lower boundary looks coarse. In the image
on the right, the outer tessellation level has been changed to 30, resulting in a
smooth-looking boundary. In both images, the inner tessellation levels were
set to 10 which, in this case, were enough for standard smooth shading.
Finally, we return to the isolines patern and use the Bézier patch exam-
ple to extend the Bézier curves example and produce multiple isolines. First, in
the .glib file you replace the layout qualifier by one that specifies the isolines
patern instead of the quad patern, as in the code
layout( isolines, equal_spacing) in;
Search WWH ::




Custom Search