Defines |
| #define | FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) ) |
| #define | F2 0.366025403f /* F2 = 0.5*(sqrt(3.0)-1.0) */ |
| #define | G2 0.211324865f /* G2 = (3.0-Math.sqrt(3.0))/6.0 */ |
| #define | F3 0.333333333f |
| #define | G3 0.166666667f |
| #define | F4 0.309016994f /* F4 = (Math.sqrt(5.0)-1.0)/4.0 */ |
| #define | G4 0.138196601f /* G4 = (5.0-Math.sqrt(5.0))/20.0 */ |
Functions |
| static float | grad1 (int hash, float x) |
| static float | grad2 (int hash, float x, float y) |
| static float | grad3 (int hash, float x, float y, float z) |
| static float | grad4 (int hash, float x, float y, float z, float t) |
| GLfloat | _slang_library_noise1 (GLfloat x) |
| GLfloat | _slang_library_noise2 (GLfloat x, GLfloat y) |
| GLfloat | _slang_library_noise3 (GLfloat x, GLfloat y, GLfloat z) |
| GLfloat | _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
Variables |
| unsigned char | perm [512] |
| static unsigned char | simplex [64][4] |
C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions.
- Author:
- Stefan Gustavson (stegu@itn.liu.se)
Definition in file slang_library_noise.c.