arkology / ShaderV

Godot Visual Shader Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Noise output isn't normalized

trickster721 opened this issue · comments

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