webgpu support
First of all, thank you for the crate!
---
I am running into some issues when using this crate targeting wasm. (on branch `origin/bevy-0.17` at the time of writing)
I am using `bevi_cli`'s command `bevy run --example shapes web --open` to test web comparability.
---
Without the `webgpu` feature enabled on `bevy` I get this
```
No wgpu backend feature that is implemented for the target platform was enabled. See `wgpu::Instance::enabled_backend_features()` for more information.
```
---
With `webgpu` feature enabled on `bevy` this is the new error on the browser console (chromium & firefox):
```
not implemented: clear_texture is not yet implemented
```
---
Removing the `clear_texture()` calls [here](https://github.com/komadori/bevy_mod_outline/blob/9b509abe41ac1d2b882adaf63855e24a20ced3ff/src/node.rs#L294) and [here](https://github.com/komadori/bevy_mod_outline/blob/9b509abe41ac1d2b882adaf63855e24a20ced3ff/src/flood/flood_init.rs#L163) seems to fix the errors, and on windows native build the examples looks identical.
Although the WASM build is now running and the cube & donuts is rotating & moving, the outline doesn't seem to work.
Correction -- It does work on Chromium based browser...
Might be just Firefox's incomplete `webgpu` implementation I guess -shrug-
but from what I could tell from bevy examples and reading some of the pipeline codes there shouldn't be a reason why it won't work on Firefox too.
I am gonna slightly poke into this and see if I can figure something out. If you got a debug workflow is it possible to ask you to run through those intermediary texture and see if you can get those working on Firefox too?
---
summary: this crate can support webgpu if the `clear_texture` can be removed / replaced with web comparable calls. Is this alright to do from your point of view?
---
Firefox:
<img width="1123" height="918" alt="Image" src="https://github.com/user-attachments/assets/ea426235-e6a9-4491-a4cb-81a0711fbf09" />
Edge (Chromium):
<img width="1083" height="935" alt="Image" src="https://github.com/user-attachments/assets/6c277bb0-da57-43dc-8866-2a4a89cbdc49" />
关闭于 2026-02-16 1 条评论