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

Add support for WebGPU compute shaders #735

Open
3 tasks
TheBlek opened this issue Feb 4, 2025 · 2 comments
Open
3 tasks

Add support for WebGPU compute shaders #735

TheBlek opened this issue Feb 4, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@TheBlek
Copy link

TheBlek commented Feb 4, 2025

Is your feature request related to a problem? Please describe.

WebGPU compute shaders seem to be more performant than GPGPU with WebGL. So it seems natural to support new API

Describe the solution you'd like

Add support for all operations that are available in GLSL right now for compute shaders.

  • Bvh buffer representation
  • Closest point to point
  • First hit ray intersection

Additional context

Original idea from here

@TheBlek TheBlek added the enhancement New feature or request label Feb 4, 2025
@TheBlek
Copy link
Author

TheBlek commented Feb 4, 2025

I would like to take a shot at this
If its not too early to try to adopt WebGPU that is. (I've read somewhere that its not finalized and might change)

@gkjohnson
Copy link
Owner

gkjohnson commented Feb 12, 2025

This would be an awesome addition. I've been wanting to support compute shaders for awhile and it's starting to look like it's become more viable, now. And adding query functions like this is a good first step.

Bvh buffer representation

The BVH is already stored in a linear buffer so this shouldn't be too difficult to support.

(I've read somewhere that its not finalized and might change)

As far as I understand the spec is still in flux a bit but I think that's okay. It won't change so dramatically that it will completely invalidate the work, I don't think.

Issue #499 also lays out some papers for building a BVH on the GPU via compute shader, which would help improve build times and allow you to use the BVH on the GPU directly after building it, as well. Perhaps something else to look at once basic queries are done if it's interesting depending on what your use cases are.

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

No branches or pull requests

2 participants