arkology / ShaderV

Godot Visual Shader Plugin
MIT License
807 stars 41 forks source link

Noise output isn't normalized #17

Closed trickster721 closed 10 months ago

trickster721 commented 11 months ago

The basic Perlin and Simplex noise shaders are outputting values between -1 and 1, so the result is clamped to mostly black. Half of the gradient is missing.

half_noise

The last line of perlin2d.gdshaderinc should be:

return (2.3 * n_xy + 1.0) * 0.5;

Then the noise has the full normalized range, and looks the way it's supposed to:

fixed_noise