-
Notifications
You must be signed in to change notification settings - Fork 316
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
Fix blue trail #469
Fix blue trail #469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
sample/particles/particle.wgsl
Outdated
rand_seed = fract(rand_seed * cos(35.456+f32(invocation_id) * seed.yw)); | ||
rand_seed = fract(rand_seed * cos(41.235+f32(invocation_id) * seed.xw)); | ||
rand_seed = fract(rand_seed * cos(35.456+f32(invocation_id) * seed.yw * 0.01f)); | ||
rand_seed = fract(rand_seed * cos(41.235+f32(invocation_id) * seed.xw * 0.01f)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is probably only necessary because seed.x and seed.y can be large:
webgpu-samples/sample/particles/main.ts
Lines 416 to 419 in 1e3c2d3
Math.random() * 100, | |
Math.random() * 100, // seed.xy | |
1 + Math.random(), | |
1 + Math.random(), // seed.zw |
Could we just adjust the seed instead so it's not so large? I'm not sure what effect it would have.
114c663
to
ca21d60
Compare
I think I've found what cause this weird behavior. When adding |
Oh! Fantastic! |
FIX #458