Open Ralith opened 4 years ago
The reference impl at http://staffwww.itn.liu.se/~stegu/simplexnoise/DSOnoises.html has simplex noise implementations with derivatives with detailed comments. The permutation table they use is identical to this crate's so I'm guessing there's some common lineage there; however, their scaling factors don't (all?) match the ones needed by this crate, so I'm leery of porting over changes blindly.
Simplex noise is said to have "a well-defined and continuous gradient everywhere that can be computed quite cheaply." This is immensely valuable for generating smooth normals for noise-displaced geometry, and may have applications in generating random vector fields directly. It would be awesome to have this in simdnoise.
Generating displacement + normals will generally want both the value and its spatial derivative simultaneously, so there might be performance benefits in generating them simultaneously in a single pass.