The Book of Shaders
19 comments
·June 26, 2025aquova
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.
hackerknew
I learned so much from this website many years ago when I was first discovering webgl programming. It is unfortunately unfinished, yes, but those unfinished chapters on advanced topics make for curiosity and the desire to learn more. There are plenty of other resources that fill in the details, but this is a great beginner guide.
hijp
interesting that even though it’s such a cherished resource no one’s taken up the flag to complete it after all this time.
zkmon
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.
thomascountz
What real engineering work do you mean?
Jare
Shader parameter management, visibility and culling, shadow and lighting setup, scriptable pipelines, geometry shader orchestration, etc. There's a lot of work involved in preparing the stuff that you'll ask your shaders to, well, shade. But I wouldn't exclude shaders from "real engineering work", they're all parts of the whole.
jonplackett
Vertexes, presumably.
raincole
I feel this book is posted on HN every a few months for years, but it never gets completed...
AndrewStephens
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.
Such a shame it has never been completed.
kookamamie
> Bump-maps
The terminology seems rather old.
brador
This seems perfect for AI. I want one window with the AI code generator and a second window with the output to see the shader.
rossant
(2015)?
Also, there may be many earlier posts about this on HN.
deadbabe
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.
90s_dev
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.
kaibee
https://iquilezles.org/articles/ Also recommend this as a resource, immensely useful and full of examples.
Uehreka
Honestly this is exactly the kind of area where I’ve found things like OpenAI’s Deep Research and Anthropic’s Advanced Research help a ton. Tell the LLM what you’ve learned, what kinds of things you want to know, and if you don’t know what you want to know then heck, tell it how you feel (like you just did in this comment). I generally try to give it a nice chunky paragraph or two of background and questions.
In my experience, the LLM is usually good at surveying the field, finding resources you might not have found, and evaluating the quality of learning resources. The report that comes back might be super juicy, or it might just point you in some new directions, but it will probably help you get unstuck.
hackerknew
Yes, this is exactly what this website is for, and the interactive examples put you right in to programming in glsl and give such an awesome base to experiment.
There are plenty of resources out there as you get more advanced, but imo bookofshaders is a great starting resource.
ghfhghg
Try looking up Ben Cloward on YouTube. He's quite concise and thorough.
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.
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