<p>I have published it, in several versions, and it's not difficult to do it. Simplex noise is a lot easier to differentiate because it's a sum of polynomials, rather than a nested polynomial interpolation as in classic Perlin noise.</p>
<p>GLSL code for 2-D and 3-D simplex noise with derivatives is here:</p>
<p><a href="https://github.com/ashima/webgl-noise/tree/master/src" rel="nofollow noreferrer">https://github.com/ashima/webgl-noise/tree/master/src</a></p>
<p>The 3-D version is in the file &quot;noise3Dgrad.glsl&quot;. The 2-D version in &quot;psrdnoise2D.glsl&quot; additionally reimplements Perlin and Neyret's &quot;flow noise&quot; gradient rotations and can be made to tile over integer-sized rectangles. (Well, even-sized integer rectangles. The triangular/heaxagonal simplex grid placed some restrictions on tiling.)</p>
<p>I am currently working on a tiling version of 3-D simplex noise with rotating gradients as well (and analytical derivatives), and I will submit it for a more formal publication shortly, to hopefully make it more visible to implementers.</p>

CC BY-SA 4.0
2021-06-08T13:56:17.303Z
Can you please edit your answer so that it can be understood without the link? If the link expires for some reason, it isn't helpful anymore.
wychmaster
CC BY-SA 4.0
2021-06-05T11:06:50.197Z
2021-06-05T11:06:50.197Z
Stefan Gustavson
<p>I am using Simplex Noise to generate a 3D field. The specific implementation is <a href="https://github.com/jackmott/FastNoise-SIMD" rel="nofollow noreferrer">FastNoise-SIMD</a>.</p>

<p>Assume I want to have a gradient (or derivative) for a sample at Sx, Sy, Sz in that field.</p>

<p>Do I actually need to sample the value of the field at all neighbours of sample S?</p>

<p>If so, that makes it a quite expensive operation, as the 4-octave Simplex Noise function I use is already quite expensive, evaluating them for all neighbours would make it too slow for my purposes.</p>

<p>Is there a way to directly compute the derivative of SimplexNoise that is cheaper than getting the deltas from the neighbours?</p>

<p>Some Perlin noise implementations <a href="https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/perlin-noise-part-2/perlin-noise-computing-derivatives" rel="nofollow noreferrer">have an analytical derivative</a>. But none of the Simplex Noise implementations that I have found support sampling the gradient along with the field value.</p>

<p>Have analytical derivatives been done on Simplex Noise, or is it maybe not possible for Simplex Noise? </p>

CC BY-SA 4.0
2021-01-23T02:58:27.183Z
This shader uses a simplex noise algorithm with derivatives https://www.shadertoy.com/view/Ws23RD. Also if you want a FBM function that works with derivatives, scroll down a little bit and you'll find one here: https://www.shadertoy.com/view/XttSz2
Pedro Henrique
CC BY-SA 4.0
2020-05-15T17:11:35.317Z
There's no reason you couldn't do analytical derivatives with simplex noise, but maybe no one has sat down and worked it out and published it yet.
Nathan Reed
<sampling><noise>
Analytical derivative of a 3D Simplex Noise field
Bram
# Analytical derivative of a 3D Simplex Noise field

(Asked by: username_0 on 2020-05-14)

I am using Simplex Noise to generate a 3D field. The specific implementation is [FastNoise-SIMD](https://github.com/jackmott/FastNoise-SIMD).

Assume I want to have a gradient (or derivative) for a sample at Sx, Sy, Sz in that field.

Do I actually need to sample the value of the field at all neighbours of sample S?

If so, that makes it a quite expensive operation, as the 4-octave Simplex Noise function I use is already quite expensive, evaluating them for all neighbours would make it too slow for my purposes.

Is there a way to directly compute the derivative of SimplexNoise that is cheaper than getting the deltas from the neighbours?

Some Perlin noise implementations [have an analytical derivative](https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/perlin-noise-part-2/perlin-noise-computing-derivatives). But none of the Simplex Noise implementations that I have found support sampling the gradient along with the field value.

Have analytical derivatives been done on Simplex Noise, or is it maybe not possible for Simplex Noise?

**Tags:** sampling, noise

> **Comments:**
> **username_2**: There's no reason you couldn't do analytical derivatives with simplex noise, but maybe no one has sat down and worked it out and published it yet.  
> **username_1**: This shader uses a simplex noise algorithm with derivatives https://www.shadertoy.com/view/Ws23RD. Also if you want a FBM function that works with derivatives, scroll down a little bit and you'll find one here: https://www.shadertoy.com/view/XttSz2  

---

## 1 answers

### Answer by username_3 on 2021-06-05. Score: 3 | Accepted answer

I have published it, in several versions, and it's not difficult to do it. Simplex noise is a lot easier to differentiate because it's a sum of polynomials, rather than a nested polynomial interpolation as in classic Perlin noise.

GLSL code for 2-D and 3-D simplex noise with derivatives is here:

<https://github.com/ashima/webgl-noise/tree/master/src>

The 3-D version is in the file "noise3Dgrad.glsl". The 2-D version in "psrdnoise2D.glsl" additionally reimplements Perlin and Neyret's "flow noise" gradient rotations and can be made to tile over integer-sized rectangles. (Well, even-sized integer rectangles. The triangular/heaxagonal simplex grid placed some restrictions on tiling.)

I am currently working on a tiling version of 3-D simplex noise with rotating gradients as well (and analytical derivatives), and I will submit it for a more formal publication shortly, to hopefully make it more visible to implementers.

> **Comments:**
> **username_4**: Can you please edit your answer so that it can be understood without the link? If the link expires for some reason, it isn't helpful anymore.  

---

