Graphics Reference
In-Depth Information
Figure 15.34. The warped arrow.
Figure 15.35. The warped arrow
with the peristaltic bulge.
You may have noticed the uniform variable called uPeristaltic . This
glman uniform slider variable lets us create a dynamic visualization trick that's
much easier to achieve with shaders. This shader uses the glman built-in Timer
variable to cause part of the arrow to bulge, and the bulge travels with time.
This is another example of two-pieces-of-information-for-the-price-of-one
display. The full arrow shows the entire streamtube, and the moving bulge
shows relative velocity, as shown in Figure 15.35. This is definitely one exam-
ple worth running! It has a pig-in-the-python look to it, and is either one of
the most interesting shader applications you will ever see, or one of the most
disgusting.
Geometry Visualization
The GLSL geometry shader makes some additional techniques available for
visualization applications. Here we discuss only two, but as the geometry
shader capability becomes more widely available, we recognize that many
more will be developed.
Silhouettes
Techniques for creating silhouetes were discussed earlier in Chapter 12. They
are included again here because silhouetes are a valuable technique for visual-
izing 3D geometry. Figure 15.36 shows a carbon-50 molecule without and with
silhouetes. Notice how the silhouetes make the outside edges of individual
atoms a lot crisper and serve to help define the overall shape of the object.
Search WWH ::




Custom Search