At @Mark_Kriegsman 's urging - I ran a whole bunch of checks on the including min/max ranges, overflow/underflow checks, etc… Based on the results of that, I’ve tweaked all the noise functions to clean up the quality/range of their output. (Sadly, the 1d noise functions have a value spike in the middle - i’m not sure what’s going on with that for now).
Some background on what’s going on here, and how the noise functions are going to tweak a little bit more from how most people on AVR have been doing noise.
It turns out that the simplex noise algorithm doesn’t give you values in the range (-1,1) - i mean, well, technically it does, but in reality, that range is closer to (-0.6,0.6). This means that when you do your octave combinations with a frequency of 2 and an amplitude of 1/2, you will approach the range of (-1,1). A very small percentage of values might overflow (in my case, that was something like 0.1% of values overflowing for 16bit 3d noise - but it required going 5 octaves to hit that overflow).
However, people in the AVR world who are using noise want values form 0-255. So, first thing they’d do is add some constant value to shift things up, e.g. add 128 for the 8 bit noise functions. Of course, while this would center the distribution of data it would clump in the center, e.g. 58-200. Recognizing that this might happen, I had the noise functions also attempt to scale the values a bit to try and stretch the range to cover the full 0-255 (or 0-65535 for 16 bit).
This led to some problems. The first one was that I only used a run of a couple million 3d values to determine the min/max ranges, then used that for the 1d and 2d ranges as well. What this meant was that my scaling was flat out wrong for 1d/2d, and also it was enough off with the 3d noise that sometimes values would wrap when they shouldn’t.
So - these are now fixed - and you can see the distributions of the output of the inoise functions below.
ETA: unfortunately - the AVR versions of the functions are doing something funky. I’m still trying to figure out what it is - but the short version is - code does one thing on ARM, and another on AVR - and i’m trying to figure out why.
