I'm confused about why this site keeps making the rounds, because it's been in the exact same unfinished state for something like five years now. Patricio keeps promoting the unfinished work without working on it. The intro content is good but it's been stuck in intro mode for years. It's just a strange self promotional situation.
It's a real pity, because the current chapters are incredible. Patricio's gift of communication along with the artistic and creative aspects of the book really makes the learning process so much more inspiring. I hope he finishes the other chapters some day.
Indeed, it is a very valuable resource for beginners to jump into shaders, but for those that already know the basics there are several good books focusing on shading languages, and NVidia has a couple of free ones available on their site.
Even the outdated book about Cg language has good content regarding shading in general.
But if Patricio ever puts it in an actual book, I would gladly buy it.
I remember this from a year or two ago. I found it to be a useful entrypoint into a topic that I thought I'd never understand at all.
Understanding the basics of shaders has been helpful for some audio-visual tchotchkes that I have enjoyed building. Hope to learn more, over time. And I'd really love to see more of the chapters that are planned, but unavailable.
Is there a changelog that will tell us what parts of the book were updated and when they were updated?
Whatever you do don’t try to zoom in on the text with your phone. I did that and the site had a virtual seizure - so bad I had to refresh the page and resign myself to tiny text.
Can someone explain how they managed to do this? I've never seen anything like it!
Perhaps all the text is rendered via JS and re-rendering in an infinite loop where the CSS switches the padding of the div surrounding the text back and forth by ~5px at each point in the loop?
The animated moon at the top of the main page is a WebGL canvas. If your system is wrestling how to render/fallback from it, that could cause the page to hang for many seconds.
Then the JS might be running wild in the background while that is resolved. Make sure you have WebGL enabled and are using a new version of Firefox/Chrome.
Last time I played with this, I read through the whole thing without at any point realizing that the code was live and could be experimented with. Don't make the same mistake I did!
Also I don't know much about WebGL and am quite curious how this works. Are they compiling these shaders locally in the browser?
Shaders are cool - I think? I wanted to use them for generative animations , but (maybe I have it wrong) I could not see a way to store state with each pixel. I wanted the color of the pixels to be a view onto some underlying state at that pixel location - and update that state in a shader manner, so parallel and multi-threaded, with each state step depending only on the state of its neighbors - a generalized pixel if you will.
Sounds like you need a multi-pass shader. As an example, you can store state in one pass, apply operations in another pass, and render in the last pass.