Anatomy of a Shader
Scroll-through stories that build a picture one shader idea at a time. Each step shows the line of code and what it does to the image, so you can follow along without having written a shader before.
An ocean, one idea at a time
A flat grid becomes a sea at sunset. Nine shader ideas, each added while you scroll.
Vertex shader · Fragment shader · Lighting · Time · Atmosphere · Sky · Foam · A second mesh · Post-processing
Start the journeySpace, from one pixel out
One bright pixel becomes a sky, a nebula, a planet with air, and a black hole that bends all of it.
Distance · Random numbers · Layered noise · Spheres · Rim light · Bending directions
Start the journey