6 ms·
For anyone unfamiliar with WebGPU: It's a successor to WebGL, along the lines of newer graphics APIs like Metal/Vulkan/DirectX 12. Google and Mozilla are also
by throwaway34241 5y ago
For anyone unfamiliar with WebGPU:
It's a successor to WebGL, along the lines of newer graphics APIs like Metal/Vulkan/DirectX 12. Google and Mozilla are also developing a C-compatible library that should be available as an OpenGL alternative for native code.
So if successful it might end up as the most convenient cross-platform graphics library (across desktop/mobile/the web). Currently the alternatives in this space are:
- OpenGL (which Apple has deprecated and is stuck on an older version on their platforms)
- Vulkan, which is the lowest level and most difficult to get started on of the APIs, and also doesn't work on the web, but is supported on Apple systems by using the MoltenVK library to translate it to Metal
- some non-standardized libraries written by third party developers like bgfx and Oryol.
For the shading language they settled on a text based language designed to be easily translatable to/from Vulkan SPIR-V bytecode, with the goal of being able to re-use existing shader compilation toolchains (and most of the work put in to SPIR-V), while still having the ability to write/read shaders without a shader compiler. Also SPIR-V files are fairly large and apparently don't compress well with standard algorithms (see SMOL-V) so the text based format should probably be more efficient to transmit on the web.
- mebr 5y agoA question, I was wondering if you happen to know whether there is a long term commitment from these orgs/companies to support WebGPU, say for at least 10 years?
- throwaway34241 5y agoIf it's approved as a web standard, I would expect them to support it basically forever, since otherwise websites would stop working. I don't think there's any plan to deprecate the previous standard (WebGL) that came out around 10 years ago.
- rewq4321 5y ago> I don't think there's any plan to deprecate the previous standard (WebGL) that came out around 10 years ago There's basically zero uncertainty around this. It would break the internet. As you probably know it's extremely difficult to make even tiny backwards-incompatible changes to features that have become web standards and have been implemented on all major browsers.
- exciteabletom 5y agoA humorous example is the misspelling of the referer HTTP header: https://en.wikipedia.org/wiki/HTTP_referer#Etymology https://en.wikipedia.org/wiki/HTTP_referer#Etymology
- kvark 5y ago> Google and Mozilla are also developing a C-compatible library that should be available as an OpenGL alternative for native code. To clarify, Google and Mozilla are both developing separate libraries: Dawn (in C++) and wgpu (in Rust) respectively. Both are designed to be usable behind the same native C API - https://github.com/webgpu-native/webgpu-headers https://github.com/webgpu-native/webgpu-headers > For the shading language they settled on a text based language designed to be easily translatable to/from Vulkan SPIR-V bytecode Going from SPIR-V has been anything but easy for us (in Naga/wgpu land), so far. Raph posted this link in the comment above - http://kvark.github.io/spirv/2021/05/01/spirv-horrors.html http://kvark.github.io/spirv/2021/05/01/spirv-horrors.html
- trinovantes 5y ago> It's a successor to WebGL Does this mean WebGL development/support has stopped?
- flohofwoe 5y agoI guess most WebGL development currently happens in Safari, because Safari is switching from their own WebGL implementation to ANGLE. Other then that, AFAIK there is no "WebGL 2.1" or "WebGL 3" planned.
- gmueckl 5y agoDon't hold your breath in anticipation of an updated WebGL standard. WebGPU seems to have a lot more support these days and is a bit closer to DX12, Vulkan and Metal in its concepts, so easier to implement in theory. At this point, I'm not even waiting for a new OpenGL version anymore. The good stuff has been mostly Vulkan exclusive for a while now.
- pjmlp 5y agoit will hardly come, but most people learning 3D are better suited with modern OpenGL or some middleware built on top of last generation APIs. With Vulkan Khronos keeps the OpenGL tradition of leaving as rite of passage to learn everything from scratch, while hunting for libraries, because community. Don't expect Vulkan SDK to provide the confort of Metal Kit, DirectXTK, Playstation PhyreEngine, ....
- dindresto 5y agoYes, compute shaders for WebGL have been cancelled in favor of WebGPU.