Auburn / FastNoiseLite

Fast Portable Noise Library - C# C++ C Java HLSL GLSL JavaScript Rust Go
http://auburn.github.io/FastNoiseLite/
MIT License
2.79k stars 327 forks source link

Question: Exact bounds on output? #32

Closed Yitzi2 closed 4 years ago

Yitzi2 commented 5 years ago

According to the wiki, all outputs are approximately bounded from -1.0 to 1.0, except for distance functions on cellular noise. Are there any exact bounds (even larger ones) on the outputs?

Yitzi2 commented 5 years ago

I started looking at it myself, and Perlin noise can actually reach outside these bounds without too much difficulty; at position (0.5, 0.5, 0.25) of a cell, if each corner has one of the gradients that maximizes the dot product, the resulting interpolation yields 17/16, and perturbing y and z slightly can result in an even higher result. (This may be because, unlike standard Perlin noise, the per-node gradients have norm of sqrt(2) rather than 1).