Shdr_
A lil WebGL library
At the beginning of 2025, I set to out to learn more about writing shaders. I had tried this before, several times. I had tried reading The Book of Shaders—several times. Inevitably, though, I would get to the chapter on shaping functions, get confused, and drop off.
This time, I decided to take a different tack. Instead of leaning on a structured course or text, I decided to learn by building. My only precondition is that I didn’t want to rely on a preexisting library to do the heavy lifting. I wanted as few layers of abstraction, and as little protection from rough edges, as possible.
Basically, I gave my curiosty permission to wander. No textbooks, no dependencies.
The fruit of that labor is a simple, slightly-opinionated WebGL library called Shdr. It won’t help you write shaders, per se, but it will help you render them without a lot of boilerplate or ceremony. If you’re interested in learning more, check out the source code and documentation, or install it and try it out for yourself.
I don’t know if it will be useful to anyone else, but it was useful to me.
Basic
Custom Uniforms
Image Textures
Video Textures
Webcam