This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.shadertoy.com/view/dlfXDN | |
// 2023 myth0genesis | |
// 4D Simplex Noise Gradient | |
// I saw that Stefan Gustavson didn't seem to have published any shader | |
// with an analytic solution for the gradients of his variant | |
// of 4D simplex noise, so I thought I'd try solving it myself | |
// and publish it here for anyone who finds it useful. | |
// Compares the analytic solution to the numerically approximated one (for a sanity check) | |
// and shows the results of all four derivatives with respect to each dimension. | |
// Top : Analytic gradient | Bottom: Forward differences approximated gradient |