Graphics Reference
In-Depth Information
teNormal = xyz;
xyz *= tcRadius;
xyz += tcCenter;
gl_Position = uModelViewMatrix * vec4( xyz, 1. );
}
In Figures 13.20 and 13.21, notice that the number of tri-
angles adapts to the screen coverage of each sphere, and that the
size of the tessellated triangles stays about the same, regardless
of radius or transformation.
Figure 13.21. The screen zoomed in (left) and rotated (right).
Figure 13.20. The original
scene (left); with triangles
shrunk to show tessellation
(middle); zoomed out (right).
PN Triangles
This example shows how you can tessellate triangles with vertex normals, or
point-normal (PN) triangles, to achieve significant levels of smoothness. This
work is based on [45] and implements the techniques discussed there.
Search WWH ::




Custom Search