not sure if I’m behind the curve on finding this, ...
# of-graphics
c
not sure if I’m behind the curve on finding this, but this webgl state viewer from the babylon.js folks is fantastic: https://github.com/BabylonJS/Spector.js
e
I heard about it when I was doing the webglfundamentals tutorial
apparently, ppl don't read the docs šŸ˜›
I don't know how I feel about GL in general, it seems like it is very useful to understand the fundamentals of the API, but anytime I think of doing anything concrete, it just feels like a pain to use GL directly vs some nice off the shelf library like ThreeJS. Vulkan looks even worse / more daunting.
d
I've been told that once you write that 1000 lines of code to initialize Vulkan and render your first triangle, the remaining code is easier to write than OpenGL. Since OpenGL is a dying API, I'm making plans to migrate. WebGPU is supposed to be ready by the end of this year, so I expect it will be the hot new API in 2021, replacing OpenGL and WebGL for new projects. There's a lot of pent up demand for something like WebGPU, so the tooling may appear pretty quickly.
s
OpenGL won't be dead for a very long time, although new feature development and versions have stopped. I imagine Vulkan will add more and more high level libraries (Khronos put out a survey for this) so for most people using the API directly it effectively be a higher level API. WebGPU isn't a great replacement because it will be missing high-end features for years
d
WebGPU will be a great replacement for OpenGL, especially for cross-platform development on newer hardware. You don't have to contend with all the variant dialects of OpenGL (the ES variant, WebGL vs WebGL 2, missing features in Apple's version), or deal with Apple's announcement that they are dropping OpenGL. All OpenGL drivers are buggy, none of them fully support the standard. You can't write OpenGL code by reading the standard, you have to learn all the tips and tricks for avoiding features that don't work, and work around platform-specific bugs. WebGPU will have the same behaviour on all platforms, backed by a comprehensive test suite, written by the same people who are designing and implementing the standard. WebGPU will also run in web browsers, which will never be true for Vulkan. WebGPU will be faster, more powerful, and easier to use than OpenGL. It will displace Vulkan in cases where web and WASM support, portability, and ease of use, are more important than bleeding edge features. OpenGL will continue to be relevant on older platforms that don't support Vulkan or WebGPU, and for running old OpenGL software. If you target WebGPU, your code won't run on most pre-2012 hardware, or on Raspberry PI 1-3 (although Raspberry Pi 4 will have WebGPU support). OpenGL emulators will still exist 20 years from now. Vulkan is the best cross-platform API for native applications that take advantage of bleeding edge features in modern GPUs.
šŸ‘ 1
The other thing about Vulkan is that, even though it works on Windows, it isn't supported by Microsoft, only GPU vendors. There are a number of high profile projects that use Vulkan on Linux and DX12 on Windows, meaning that Vulkan doesn't work so well on Windows. WebGPU avoids the need to implement multiple backends, since it uses DX12 on Windows, Vulkan on Linux and Android, Metal on MacOS and iOS.