-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Normalize strands noise output range to match JS noise() #8430
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
base: dev-2.0
Are you sure you want to change the base?
Conversation
|
CI is awaiting maintainer approval since this is from a fork — happy to update the branch if needed. |
|
I think this works, although is there a reason for doing the normalization differently in the two files? It could be easier for people in the future comparing the implementations if we use the same math in both places. |
|
Good point — there’s no strong reason for them to differ. I used the equivalent forms out of habit, but I agree it’s better for readability and future comparisons if both backends use the same expression. I have updated both GLSL and WGSL to use the same normalization math (e.g. (result + 1.0) * 0.5) and pushed a small follow-up commit. Now , both backends use the same normalization expression for consistency — thanks for the suggestion! |
|
Thanks, code looks good! I think the last step before merging is just to test out a build of this doing something similar to the sketch in the original issue. I can get to that eventually, but if you have time, that would also be great. If you run |
|
That looks great, thanks @rakesh2OO5! |

This PR normalizes the output range of the strands noise implementation to match the JavaScript
noise()function.Changes:
Tested:
noise()output rangeFixes #8386