-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix bloom wasm support #8631
Fix bloom wasm support #8631
Conversation
Nice, thank you for doing this! Could you set |
Needs a comment in the code explaining why we need a fallback for webgl2 and how the fallback is multiple textures instead of mips. Also, did you test that this works ok in practice? Iirc there are problems with HDR on wasm (maybe only when used with MSAA?), regardless of bloom. |
works for me in WebGL2 |
This shouldn't work? See https://docs.rs/bevy/latest/bevy/prelude/struct.Camera.html#structfield.hdr Turning hdr on uses Rgba16Float textures for the ViewTarget, which shouldn't work with MSAA, and supposedly should outright crash with MSAA + WebGL2. EDIT: Tried it myself, works fine 👀. Guess it got fixed on wgpu's end. I'll open a PR to update the docs. |
just out of interest, does this workaround apply to webgpu version of wasm? |
No, bloom already works in WebGPU, you can check it here on a compatible browser: https://bevyengine.org/examples-webgpu/2D%20Rendering/bloom-2d/ This fix is only for WebGL2 |
Objective
Solution
GLES doesn't support binding specific mip levels for sampling. Fallback to using separate textures instead.