
7. Procedural Textures in GLSL 115
Some patterns generated using Worley noise are shown in Figure 7.5, along with
the GLSL expressions that generate them. The r ight two spheres in Figure 7.1 are
examples of patterns generated by a single invocation of Worley noise.
7.6 Animation
For procedural patterns, all properties of a fragment are computed anew for each
frame, which means that animation comes more or less for free. It is only a mat-
ter of supplying the shader with a concept of time through a uniform variable and
making the pattern dependent on that variable in some manner. Animation speed is
independent of frame rate, and animations do not need ...