Hey there!
I was looking a bit at Babylon Native today and I didn’t find the graphics API that is used. Is it OpenGL, or Vulkan?
Are WGSL compute shaders supported?
cx20
July 15, 2024, 4:00pm
2
Regarding the graphics APIs supported by Babylon Native, the following link should be helpful: BabylonNative/BUILDING.md at master · BabylonJS/BabylonNative · GitHub
For Windows: DirectX or Vulkan
For Linux: OpenGL or Vulkan
For Android: Vulkan or OpenGL
For Apple: Metal
Babylon Native uses bgfx
as a cross-platform graphics library. Unfortunately, it does not seem to support WebGPU
and WGSL
at this time.
1 Like
Thanks that’s super interesting! So I guess there is no support at all for compute shaders at the moment?
1 Like
cx20
July 15, 2024, 4:32pm
4
This is for your reference.
Below is an issue regarding WebGPU in the bgfx repository.
opened 11:04PM - 04 Feb 20 UTC
enhancement
I'm implementing the WebGPU backend over here: https://github.com/hugoam/bgfx
I… thought I'd open this issue to keep track of where I'm at, in a similar way you did for Vulkan
Here are the examples I've got working so far (so far the web builds at each link work in Chrome canary on Windows or OSX):
* [x] [00-helloworld](https://hugoam.github.io/two/bgfx/00-helloworld)
* [x] [01-cubes](https://hugoam.github.io/two/bgfx/01-cubes)
* [x] [02-metaballs](https://hugoam.github.io/two/bgfx/02-metaballs)
* [x] [03-raymarch](https://hugoam.github.io/two/bgfx/03-raymarch)
* [x] [04-mesh](https://hugoam.github.io/two/bgfx/04-mesh)
* [x] [05-instancing](https://hugoam.github.io/two/bgfx/05-instancing)
* [x] [06-bump](https://hugoam.github.io/two/bgfx/06-bump)
* [ ] 07-callback
* [ ] 08-update
- can't update cube texture
- compute update fails
* [x] [09-hdr](https://hugoam.github.io/two/bgfx/09-hdr)
* [x] 10-font
* [x] 11-fontsdf
* [x] [12-lod](https://hugoam.github.io/two/bgfx/12-lod)
* [x] [13-stencil](https://hugoam.github.io/two/bgfx/13-stencil)
* [x] [14-shadowvolumes](https://hugoam.github.io/two/bgfx/14-shadowvolumes)
* [x] [15-shadowmaps-simple](https://hugoam.github.io/two/bgfx/15-shadowmaps-simple)
* [x] [16-shadowmaps](https://hugoam.github.io/two/bgfx/16-shadowmaps)
* [x] [17-drawstress]()
* [x] [18-ibl](https://hugoam.github.io/two/bgfx/18-ibl)
* [x] [19-oit](https://hugoam.github.io/two/bgfx/19-oit)
* [x] [20-nanovg](https://hugoam.github.io/two/bgfx/20-nanovg)
* [x] [21-deferred](https://hugoam.github.io/two/bgfx/21-deferred)
- sampling depth textures not supported
* [x] [23-vectordisplay](https://hugoam.github.io/two/bgfx/23-vectordisplay)
* [x] [24-nbody](https://hugoam.github.io/two/bgfx/24-nbody)
* [ ] 25-c99
- infinite main loop does not work with emscripten (stall)
* [ ] 26-occlusion
- missing occlusion queries
* [x] [27-terrain](https://hugoam.github.io/two/bgfx/27-terrain)
* [x] [28-wireframe](https://hugoam.github.io/two/bgfx/28-wireframe)
* [x] [29-debugdraw](https://hugoam.github.io/two/bgfx/29-debugdraw)
* [x] [30-picking](https://hugoam.github.io/two/bgfx/30-picking)
* [ ] 31-rsm
- sampling depth textures not supported
* [x] [32-particles](https://hugoam.github.io/two/bgfx/32-particles)
* [ ] 33-pom
- crash on loading shader (unable to unroll loop ?)
* [x] 34-mvs
* [x] [35-dynamic](https://hugoam.github.io/two/bgfx/35-dynamic)
* [x] [36-sky](https://hugoam.github.io/two/bgfx/36-sky)
* [ ] 37-gpudrivenrendering
- missing draw indirect
* [x] [38-bloom](https://hugoam.github.io/two/bgfx/38-bloom)
* [ ] 39-assao
* [x] [40-svt](https://hugoam.github.io/two/bgfx/40-svt)
* [ ] 41-tess
- missing draw indirect
Currently, the WebGPU implementation of bgfx is experimental, and it seems that work will resume once all desktop browsers (Chrome, Firefox, Safari) have it enabled by default.
Therefore, in my personal opinion, I think it will be a while before Babylon Native incorporates support for WGSL and compute shaders.
1 Like
Alright, I will wait a few years then, no problem x)
I hope firefox and safari get the ball rolling on WebGPU soon!
2 Likes