jwagner / jwagner/simplex-noise.js
Analytical derivatives?
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
Any chance you might add an (optional) way to get analytical derivatives for the noise result?
Derivatives are handy because they tell you the ”slope” of the noise, which is incredibly useful for use cases like terrain generation. It’s possible to manually calculate them by sampling the noise 3+ times, but (as I understand it) analytical derivatives are much cheaper to compute.
As a reference, I’ve found these implementations:
- https://iquilezles.org/articles/gradientnoise/
- https://github.com/BrianSharpe/Wombat (the `_Deriv` variants)
- https://www.scratchapixel.com/lessons/procedural-generation-virtual-worlds/perlin-noise-part-2/perlin-noise-computing-derivatives.html
I’ve explored adding them myself and making a PR, but honestly I’m a bit out of my depth here. :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.