4 ms·
My biggest problem with WebGPU is the documentation, especially if you delve into the native or emscripten variants. Not even fancy AI tools will save you - in
by jamesu 2y ago
My biggest problem with WebGPU is the documentation, especially if you delve into the native or emscripten variants. Not even fancy AI tools will save you - in fact in a lot of cases they make it worse as they often suggest solutions based on older webgpu variants or they make grossly inaccurate assumptions about how your particular webgpu implementation works.
Figuring out how to properly setup the "native" version was a nightmare, I had to find a random github project where someone thankfully made a SDL2 example.
I didn't really feel there was an active community that was interested in pointing me in the right direction either, more like a bunch of people too absorbed with building an API than actually caring about who is using it.
Maybe things will improve in the future but I remain skeptical.
- pjmlp 2y agoThat is to be expected, it is rigth there in the name, Web. The problem is that people are reaching out to it, as means to avoid the Vulkan mess, when the real alternative is middleware engines.
- grovesNL 2y agoThere's plenty of room for both approaches: a lot of projects can benefit from using a platform-agnostic API like WebGPU (web or native) directly, others might want to use engines. Anecdotally I use WebGPU (through wgpu) in a commercial application for a visualization, and would've never bothered to apply Vulkan or DX12 for that otherwise. Documentation will keep improving with time. There have already been a number of high-quality tutorials and references created over the past few years, for example: https://webgpufundamentals.org/ https://webgpufundamentals.org/ for JavaScript/the web API https://sotrh.github.io/learn-wgpu/ https://sotrh.github.io/learn-wgpu/ for Rust (web or native) https://eliemichel.github.io/LearnWebGPU/ https://eliemichel.github.io/LearnWebGPU/ for C++
- galangalalgol 2y agoI thought vulkan was getting better? I'm mostly interested from a platform agnostic compute perspective, and I've used some libraries that employed wgsl for that. I'd added it to the backlog of stuff to learn but lately it seemed like vulkan might be a better approach.
- pjmlp 2y agoThe extensions story isn't getting better than OpenGL, https://vulkan.gpuinfo.org/listextensions.php https://vulkan.gpuinfo.org/listextensions.php Additionally, setting up the infrastructure, even with Vulkan 1.3, is a bit piece of code.
- johnnyanmac 2y ago>when the real alternative is middleware engines. Is there even a good Middleware engine that can also target web? My impressions are that both Unity and Unreal expressed interest in WebGPU support, but what's publicly available is pretty barebones. Also, I imagine the people working with WebGPU to begin with are either hobbyists, looking to learn and work in a professional role with WebGPU, or are in fact making that future Middleware (be it proprietary or open source).
- pjmlp 2y agoYeah, but the whole point is people using WebGPU as if it was a native API, outside of the browser.