I finally managed to get a 4D version of Perlin’s simplex noise working in GLSL. The simplex ordering was the trickiest part, but the result clearly shines in performance compared to classic 4D noise, which I also implemented for comparison.
Note that you can test all six flavors of noise (2D, 3D, 4D, classic and simplex) by commenting out and uncommenting lines in main() at the end of the fragment shader file and simply restarting the program.
This is the last update from me for a while, the analytic derivative computation will have to wait. If anyone else feels up to that task, please do it and share the result with the rest of us.
“Simplex noise” is more than the small fixes that
was named “improved noise”, it’s a new creation
from Ken Perlin, described (in a somewhat
confusing context) by himself here:
It’s better, faster, nicer looking and suitable
for very inexpensive hardware implementation,
but it’s quite similar in appearance and has the
same use as classic Perlin noise.
The following based on Perlin’s course notes helped me at least figure out the “hairy” factors. Given n = dimension of noise:
f = sqrt(n + 1);
skew = (f - 1) / n
deskew = (f - 1) / (nf)
Yep, that’s the “hairy factors” all right.
I also found Perlin’s course notes to help
me out there. I do not pride myself of being
all that knowledgeable in N-D geometry when
N gets larger than 3…