Hi, so I have implemented curl noise for my particles based on the code here:
https://github.com/cabbibo/glsl-curl-noise/blob/master/curl.glsl
For the noise calculation I used the simplex noise code from here:
https://github.com/ashima/webgl-noise/blob/master/src/noise3D.glsl
Works great and produces a nice fluid, swirly effect. But, as you can see in the curl code it calls the "snoise" function a total of 18 times for each curl calculation. I don't think that is necessary because other examples I have seen only calls noise 3 times, once for each axis, while calculating the derivates used to calculate curl at the same, in the noise function. Like here:
https://github.com/rajabala/CurlNoise/blob/master/CurlNoise/Curl.cpp
It uses this noise: https://github.com/rajabala/CurlNoise/blob/master/CurlNoise/Noise.cpp
That code uses regular perlin noise though, not simplex noise like I'd like to use (and it is c++ code, I'm using hlsl). My question is, how can I calculate the derivates for the curl as in the last example (PerlinNoise3::EvaluateNoise), but using the simplex noise code from above? From what I read you should get the derivatives almost for free when calculating simplex noise. I'm not so concerned about understanding the exact math behind it, some example code would be great.