255 points · by ducaale · 5y ago · 47 comments
Still incomplete but browsable online and has its own interactive shader editor
(try to click on values like floats or vectors)
And for WebGPU, it seems like C++, Rust and HLSL had a baby named WGSL.
Finally, GLSL on desktop, GL ES, WebGL and Vulkan isn't the same language anyway, just close enough to port most shaders.
I originally learned opengl in school and after a few years of working with it I transitioned to a job where we primarily used Direct3D. I guess I had passively picked up enough bits and pieces along the way because I never really thought about the shift.
I briefly looked at Vulkan when it first came out, but I haven't had the time to get into it. That's a whole different beast.
Sony uses a variant of HLSL called PSSL [1], where one of the goals to it was being HLSL-compatible.
[0] https://tcrf.net/Mario_Kart_8/Kiosk_Demo_(April_4th,_2016)/d... [1] https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdceurope201...
Not all Nintendo consoles do so.
And the switch has even GL 4.5, Vulkan and NVN to chose from.
As anyone with some graphic programming experience in cross platform knows, even among GL variants, being a variant is enough for shaders not to compile the same way and require code rewrites.
Safari 15 just added WebGL 2.0 available on stable, and native debugging tools are still the way to go for most cases.
After 10 years.
I still remember Macromedia/Adobe showing off their flash 3d engine. Nothing was accelerated, just software rendering. Ugly and slow but there wasn't anything better at the time. It went nowhere I think
See Unreal Engine 3 demo on Flash.
And with Web 3D reflecting 2012 hardware in 2021, no wonder that the answer for ultimate 3D and good debugging tools is native on mobile, or server side rendering with streaming.
How to create something like this (including sound!) while thinking on a per color x,y basis is mind boggling.
A good example is the Revision 2021 semi-finals[1]. The entire video is worth watching, but I especially recommend watching the last half of evvvil-vs-flopine (from about 43:00); the last few minutes (from ~56:00) fundamentally changed my understanding of what is possible in a fragment shader. Ray marching into a hand crafted signed distance field is such a bizarre way of thinking about a scene.
[1] https://www.youtube.com/watch?v=NBdRfFwuP40
edit: corrected 'last few minutes' time
It's not printed on dead trees but there's easily enough covered there for a book or three.
5 hour video of its creation: https://www.youtube.com/watch?v=Cfe5UQ-1L9Q
Utterly amazing.
https://www.youtube.com/watch?v=rvDo9LvfoVE is a good first watch.