next up previous contents
Next: 5.13.5 Other Noise Functions Up: 5.13 Procedural Texture Generation Previous: 5.13.3 High Resolution Filtering

5.13.4 Spectral Synthesis

Now that we can create a single frequency noise function using the framebuffer, we need to create the different octaves and to composite them into one texture. For each octave:

  1. Scale the texture matrix by a power of 2 in both s and t.
  2. Translate the texture matrix by a random offset in both s and t.
  3. Set the texture wrap mode to GL_REPEAT for s and t.
  4. Draw a textured rectangle.
  5. Accumulate the color buffer contents.
The random translation is an attempt to minimize the amount of overlap between each octave's texels; without it, every octave would use texels from the same corner of the input image. The accumulation is typically done with a scale factor that controls the weight we want to give each octave.



David Blythe
Thu Jul 17 21:24:28 PDT 1997