"For too long, many nations, including my own, tolerated, even excused, oppression in the Middle East in the name of stability. Oppression became common, but stability never arrived. We must take a different approach. We must help the reformers of the Middle East as they work for freedom, and strive to build a community of peaceful, democratic nations."
- George W. Bush

Framework 4 (Last updated: October 25, 2019)
Framework 3 (Last updated: February 6, 2017)
Framework 2 (Last updated: October 8, 2006)
Framework (Last updated: October 8, 2006)
Libraries (Last updated: September 16, 2004)
Really old framework (Last updated: September 16, 2004)
Perlin noise
Wednesday, December 18, 2002 | Permalink

Source code
PerlinNoise.zip (88 KB)

This demos does perlin noise in a fragment program. The output of the demo doesn't look like much, but it isn't nearly as interesting as the fact that you can actually do this kind of stuff in a fragment program. There is a wide range of applications to Perlin noise, especially in graphics. I already have an idea how to use it in a more useful manner.

For doing Perlin noise you use a table of random values on which you apply a band pass filter. In this case the table is obviously a texture. In order to reduce the amount of texture accesses I have instead of just using a single channel texture mirrored the neighbor values in the other channels. So R it this texel, G is the one to the right, B is the one below and A is below right. This way I only need 2 texture accesses instead of 8 for each pixel.
This demo does the 2D noise function, but extending it to the 3D version should be straight-forward, with performance implication of course though. To get some kind of animation in this demo I just let the output be a simple function of the Perlin function and time.