-
Notifications
You must be signed in to change notification settings - Fork 9
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
Panic in wasm builds #11
Comments
The first panic seems to be a wgpu bug: gfx-rs/wgpu#5263 The second one is my bad, I forgot to add code to determine when to enable multisampling for texture bindings: https://github.com/mbrea-c/bevy_firework/blob/master/src/render.rs#L297. I'm surprised this didn't come up before tbh, I'll try to get it fixed this evening. Thanks for reporting! |
PR #13 should fix the second crash, but the third will need slightly more work. I think it's happening because the Msaa setting is being changed after the uniform bindgroup layout is generated. One solution could be to add a system to re-create the uniform bindgroup layout and the dummy textureview whenever the Msaa resource changes. |
Great! I'll check that out soon. I'd hope that some sort of workaround could be found to allow msaa to be used eventually, but that fix will be helpful. For the third, I'd personally be content with a "documentation fix," just making sure the examples work with wasm and showing users how to do that. |
Agreed
The last few days have been busy, but I can get back to this now. |
The current rendering code was assuming that Msaa was always on due to an oversight. This PR will determines whether to bind a texture with multisampling enabled based on the actual msaa configuration. Fixes the second crash mentioned in #11, and works around the first in the example code.
Version tested
Tested v0.3.0.
Bisected to aa0b278
Info
Reproduction
With
wasm-server-runner
:cargo run --example sparks --target=wasm32-unknown-unknown
Panic
Notes
With
Msaa
disabled withthere's a different panic:
And just a note: For the
pbr
example,Msaa
must be disabled before theParticleSystemPlugin
is added, otherwise, there's a different panic:The text was updated successfully, but these errors were encountered: