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

WebGL2 Support #6

Closed
jgayfer opened this issue Jun 5, 2024 · 1 comment · Fixed by #7
Closed

WebGL2 Support #6

jgayfer opened this issue Jun 5, 2024 · 1 comment · Fixed by #7

Comments

@jgayfer
Copy link
Owner

jgayfer commented Jun 5, 2024

Right now we only support wgpu, as we're using a storage buffer in our shader, which WebGL2 doesn't support.

If we swap this to a uniform buffer (ideally with a feature flag), we should be able to get things running with WebGL2.

@jgayfer
Copy link
Owner Author

jgayfer commented Jun 6, 2024

From #5

Turns out that passing in a runtime sized array into a uniform buffer isn't a supported operation. Sounds like we'd need to get tricky with storing the array of point lights in a texture, and reading the data from there.

There's also the consideration that to support WebGL2, we wouldn't be able to use compute shaders, which I've been hoping to take advantage of for light occlusion.

I'd love to support WebGL2, but I don't currently have a strong understanding on how to reasonably sidestep the limitations.

TL;DR - There's ways to get WebGL2 support, but they're trickier than anticipated given our current implementation.

@jgayfer jgayfer changed the title Support WebGL2 WebGL2 Support Jun 6, 2024
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