-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Examples: WebGPU GPGPU Birds #29081
Examples: WebGPU GPGPU Birds #29081
Conversation
I think there's still some issues with the velocity code for some reason. Is there anyway to output the shader code built by the NodeBuilder without explicitly modifying the WGSLNodeBuilder class with console calls? EDIT: I've also changed the color output a bit to reflect the fact that lighting can be integrated with the colorNode, and added calls to the UniformNode.label() function as I think it might be helpful to surface some of the debug capabilities of the node systems for website readers, even if there is a negligible impact on the effectiveness of the shader itself. The original shader had both a call to update the fragment shader for the birds and commented out test code, so I think this is in keeping with the original sample. |
24ffce5
to
cf3bab7
Compare
…dd more instructive comments
dc9575b
to
618318a
Compare
Awesome!! Happy to see it work on the WebGL Backend thanks to the PBO fallback! 😎 |
Description
A port of the GPGPU birds sample to WebGPU Compute shaders. We already have a fair amount of compute shaders, but I figured it wouldn't hurt to port this one over as well. Having a 1 to 1 port of an old shader could also help with migration purposes. There's also some areas of the code that can be simplified, like the attraction code, which seems to take unnecessary steps to bring cosine output into a [-0.5, 0.5] range. Code is currently WIP and will be ready when undrafted. There's also so
GPGPU.Birds.mp4