Replies: 2 comments 22 replies
-
Hey @zicklag, thanks for getting back on this, the Bevy example looks really promising. I've created a simple branch with my changes which modifies the cube example by adding a uniform buffer for the color: When running this with WebGPU I'm getting a red triangle, but it is white on WebGL2. It's possible that I did an easy oversight somewhere.. would be interesting to see if you see the same thing, I'm on an M1 Macbook but I can test this out on Windows too. |
Beta Was this translation helpful? Give feedback.
-
@zicklag @andrewvarga do either of you know if this has been fixed? I'm using the WebGL backend and I'm running into an issue that looks a lot like shaders getting garbage uniform data. I'm wondering if it's the same problem you ran into. I'm asking because it's been a year and I know folks have been working on the WebGL backend. So I wanted to check if this is stale before digging further. |
Beta Was this translation helpful? Give feedback.
-
Originally posted by @andrewvarga here: #1617 (comment)
Hi @andrewvarga!
I can't get to matrix, so I can't get to your exact question, but I think that the WebGL2 backend is fairly "production-ish" ready, with the caveat that WebGL2 will never be able to be a fully-compliant WGPU implementation. That doesn't mean you can't use it and get great results, though.
For instance, here's a Bevy WebGL2 demo with PBR: https://bevyengine.org/examples/3d/load-gltf/.
As far as the official examples, both the mipmap and shadow examples on the official site don't work right for me, but the other ones do.
I think shadow should be fixable, but I don't know what's causing the issue. I don't know that mipmap is ever going to work right or not, I can't remember if there's a way to get WebGL to run that correctly.
As far as setting the color of a triangle, you should absolutely be able to get that working. Does the Bevy example linked to above work for you. And how about the WGPU.rs Cube example?
If neither of those work, it might be a driver/browser/hardware issue.
Beta Was this translation helpful? Give feedback.
All reactions