2-D PSRDnoise tutorial

Page 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21

Frame rate: FPS

2: The simplex grid

Now, the first "s" in "psrdnoise" is short for "simplex noise", which means that it's defined on a "simplex grid". For the 2-D case, that grid is hexagonal, with grid points located as shown here.

The function "gridpoints" in the shader code is included behind the scenes. You can have a look at it in the source code if you like, but it's not the focus of this tutorial - we just wanted to show the grid. Note that the noise value is exactly zero at each grid point, which maps to medium gray, (R, G, B) = (0.5, 0.5, 0.5), in our shader. These zero crossings are not visually apparent in the pattern, but they can be important to keep in mind when you create patterns by adding several noise components together.

	// Text in this pane will be dynamically replaced.