OpenSimplex2 icon indicating copy to clipboard operation
OpenSimplex2 copied to clipboard

No 1D functions

Open hamarb123 opened this issue 3 years ago • 1 comments

Hi @KdotJPG, I'm using the _old version of the C# one (but I haven't seen it in any others as well) and was looking for 1D generators. Can it be made from using the 2D generator along one axis, or is there a proper way to do it? Also, the reason I'm using the _old one is because it seems more optimised by caching more, is this accurate? Thanks!

hamarb123 avatar Feb 16 '22 23:02 hamarb123

You can sample the 2D generator just fine. There is a way to write 1D versions of the noise. I might consider including them when I get time. Note that 1D noise will cross zero on regular intervals, which a 1D slice of 2D noise will not as long as you don't sample along a grid line (e.g. Noise(seed, t, t)).

The _old implementations do use lookup tables, if that's what you mean. From the performance tests I ran, especially OpenSimplex2S when I originally devised the current implementation as part of my contributions to FastNoiseLite, I found the newer implementation to be faster.

KdotJPG avatar Feb 25 '22 04:02 KdotJPG