3 ms·
WebGPU support?
by astlouis44 4y ago
WebGPU support?
- ncallaway 4y agoI think it uses wgpu as it’s graphics library, so it should be there (though I don’t know if they’re targeting browsers with wasm support)
- laundmo 4y agobevy definitly runs in browsers, but since the browser support for WebGPU is limited, it currently uses the WebGL fallback.
- AndrewPGameDev 4y agoIt doesn't work currently. The only problem is that plugin initialization must be asynchronous, so you have to pass control back to the browser to allow it to initialize the WebGPU api properly[1]. I hacked async plugin initialization into a fork for Bevy 0.8[2], but I never got it to 100% work because Chrome had already moved onto a newer WGSL syntax. In theory if you do the same changes for 0.10 as I did for 0.8 it should allow WebGPU to work (and I plan on doing this in the next couple days). [1]https://github.com/bevyengine/bevy/discussions/3239 https://github.com/bevyengine/bevy/discussions/3239 [2]https://github.com/Andrewp2/andrew-bevy/tree/webgpu-2 https://github.com/Andrewp2/andrew-bevy/tree/webgpu-2 warning extremely bad code