Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noise output isn't normalized #17

Closed
trickster721 opened this issue Oct 3, 2023 · 0 comments · Fixed by #19
Closed

Noise output isn't normalized #17

trickster721 opened this issue Oct 3, 2023 · 0 comments · Fixed by #19

Comments

@trickster721
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant