If you're discovering this for the first time and think it looks interesting, I shall post the customary warning to perhaps not bother. It's a well-written resource, for what's there, but it is left unfinished right where things start getting interesting and hasn't had an update in almost a decade now.
I have tried a few times to learn shaders, but it always feels like I'm about 20 years behind on all sorts of random but necessary facts about shaders with no way to catch up in a reasonable timeframe. This book looks like it could help catch me up, and I like that all the code samples are interactive and immediately update.
If you stick with Web 3D, no worries, because those standards by nature of the Web standards, are also like trailing behind 10 years in native 3D hardware capabilities.
Also they have the benefit of having been designed from the ground up for managed languages on the host side.
The major paint point is lack of debugging tools, as browser vendors don't see as a priority having that kind of support on their developer tools.
As others have pointed out, this book is incomplete (and has been for some years), though it is considered foundational by many.
A different intro I particularly enjoyed is A Journey into Shaders[0], which succinctly covers signed distance functions and leaves you with a small finished project.
Everytime I think I understand shaders, I find examples of people running entire simulated worlds inside a shader and I no longer understand how that is possible.
This is by far the gentlest introduction to shaders I have found. It was a great help when I was working on a toy system to crossfade between images on a web page.
For some reason, I find that for real engineering work a lot of work happens outside of fragment shaders. I think fragment shaders were romanticized far more than what they deserve.
Does anyone have any suggestions for the best way to learn WebGPU/wpgu without much exposure to prior APIs such as OpenGL, WebGL, or Vulkan? As in, I'm wanting to learn WebGPU/wgpu inside and out, but I don't much want to learn about other APIs. But this has proved difficult due to a dearth of resources on WebGPU and it's new shader language, WGSL.
13 comments
[ 3.7 ms ] story [ 34.8 ms ] threadAlso they have the benefit of having been designed from the ground up for managed languages on the host side.
The major paint point is lack of debugging tools, as browser vendors don't see as a priority having that kind of support on their developer tools.
Also, there may be many earlier posts about this on HN.
A different intro I particularly enjoyed is A Journey into Shaders[0], which succinctly covers signed distance functions and leaves you with a small finished project.
Previously discussed : 555 points by superMayo on Oct 26, 2023 | 71 comments | https://news.ycombinator.com/item?id=38032288
[0]: https://www.mayerowitz.io/blog/a-journey-into-shaders
Such a shame it has never been completed.
The terminology seems rather old.