Replies: 5 comments
-
I don't have any current plans for webgpu support. I haven't investigated how much work it might be to support it so can't comment on the extent of the work, or how practical it will be to maintain long term. Would be happy for others to investigate the possibility and provide their feedback on the scale of the task/what changes would need to be made. |
Beta Was this translation helpful? Give feedback.
-
@ptsmap I have converted this thread to from an Issue to a Discussion, as it's not a bug but a longer term feature discussion. |
Beta Was this translation helpful? Give feedback.
-
@ptsmap I have experiences compiling OSG and osgEarth on top of WebGL1/2, with the help of Emscripten. I've also successfully made use of OSG and Vulkan/DX using Google Angle as interface. But to support WebGPU, we have to use a C/C++ interface provided by WebGPU, for example, Dawn (https://dawn.googlesource.com/dawn). Do you know any other interfaces that can help? It should be able to provide translation from Vulkan to WebGPU, and built based on C/C++. |
Beta Was this translation helpful? Give feedback.
-
@ptsmap what would you want to use the webgpu backend for? |
Beta Was this translation helpful? Give feedback.
-
The OpenSceneGraph can run on WebGL via Emscripten because WebGL is intentionally more-or-less identical to OpenGL ES (and Emscripten exposes it as if it were OpenGL ES), and the OpenSceneGraph natively supports OpenGL ES as for the most part, the differences to desktop OpenGL only matter at runtime, just like the differences between different versions of desktop OpenGL. However, WebGPU, while having comparable goals to Vulkan, is barely related and not even a little bit compatible. Adding WebGPU support to the VulkanSceneGraph would be comparable to adding Vulkan support to the OpenSceneGraph, and would necessarily result in an API-incompatible library. Dawn won't help here as it's an implementation of WebGPU that runs on top of other APIs like Vulkan, not an implementation of Vulkan that runs on top of WebGPU. Maybe someone will make something that translates in the other direction at some point, but nothing exists yet, and it's likely it won't be the best thing to use as WebGPU is intentionally higher-level than Vulkan, and emulating a low-level API via a higher-level one is hard without lots of overhead. For making apps that work in the browser, it might be reasonable to make a VSG-inspired WebGPU-based sister project, but it'd be a big task and probably more work than using something else or telling people to install a native app instead of using a browser-based one. |
Beta Was this translation helpful? Give feedback.
-
webgpu support web or native,and webgpu has backend as D3D11,D3D12,Metal,Vulkan,OpenGL,OpenGLES. Emscripten also support webgpu.
Beta Was this translation helpful? Give feedback.
All reactions