Learn

Learn shaders from zero

No programming experience needed. Start by painting a single color, work your way through noise, light and 3D raymarching, and finish by making and publishing your own demo. Every lesson comes with live code you can edit and exercises to try.

30 lessons · about 26 hours · no sign-in needed

Your progress is saved in this browser

Part 1

First steps

Color, coordinates, shapes and motion: the foundations of thinking in shaders

  1. Lesson 1 · 30 min

    Your first shader

    Learn that a shader is a function that runs for every pixel at once, and paint your first color

  2. Lesson 2 · 45 min

    Knowing where you are

    Work freely with positions on the screen using the two coordinates, uv and p

  3. Lesson 3 · 55 min

    Shaping functions

    Bend numbers with step, smoothstep and abs, and draw lines and graphs

  4. Lesson 4 · 50 min

    Circles and distance

    Draw circles and rings from the distance to a center, with smooth edges

  5. Lesson 5 · 55 min

    Mixing colors

    Design color with mix and palettes, and layer shapes over a background

  6. Lesson 6 · 50 min

    Time and motion

    Animate with time and sin, controlling period, speed and easing

  7. Lesson 7 · 55 min

    Combining shapes

    Add boxes and segments, and combine shapes with union, intersection and subtraction

  8. Lesson 8 · 55 min

    Moving space

    Move, rotate and scale by transforming the coordinates instead of the shapes

  9. Lesson 9 · 50 min

    Repetition and tiles

    Split the screen into cells with fract and floor, and repeat patterns

  10. Lesson 10 · 50 min

    Polar coordinates

    Think in angle and distance to draw rays, flowers, spirals and kaleidoscopes

Part 2

Patterns and noise

Randomness, noise, distance functions and light for natural textures and rich patterns

  1. Lesson 11 · 50 min

    Making randomness

    Build pseudo-random numbers with hash functions for per-cell variety and Truchet tiles

  2. Lesson 12 · 50 min

    Smooth noise

    Interpolate random values into noise for wobbly shapes and terrain lines

  3. Lesson 13 · 55 min

    Layering noise (fBm)

    Stack octaves of noise for natural textures like clouds, mountains and fire

  4. Lesson 14 · 55 min

    Domain warping

    Warp the coordinates themselves with noise to make smoke, marble and flowing liquid

  5. Lesson 15 · 55 min

    Cellular patterns (Voronoi)

    Use the distance to nearby points for cells, cracks and stained glass

  6. Lesson 16 · 55 min

    Drawing with distance (2D SDF)

    Draw with signed distance functions: smooth unions, outlines and shadows

  7. Lesson 17 · 50 min

    Light and finishing

    Finish images with glow, additive light, tone mapping and vignettes

  8. Lesson 18 · 45 min

    Touch and response

    Make works that respond to the viewer with mouse and attention

Part 3

Into 3D

Draw lit, shadowed 3D scenes with raymarching

  1. Lesson 19 · 55 min

    Rays and cameras

    Cast a ray per pixel, hit floors and spheres with math, and move a camera

  2. Lesson 20 · 55 min

    Raymarching

    Step along distance functions to draw 3D shapes

  3. Lesson 21 · 55 min

    Normals and lighting

    Find surface normals and shade with diffuse, specular and ambient light

  4. Lesson 22 · 55 min

    Building 3D shapes

    Combine boxes, tori and cylinders, and blend them smoothly into objects

  5. Lesson 23 · 55 min

    Infinite space and deformation

    Build endless scenes with domain repetition, twists and bends

  6. Lesson 24 · 55 min

    Shadows and depth

    Ground your shapes with soft shadows and ambient occlusion

  7. Lesson 25 · 60 min

    Materials and atmosphere

    Finish a scene with per-material color, reflections, fog and sky

Part 4

Making demos

Fractals, tunnels, direction and optimization — then finish your own demo

  1. Lesson 26 · 55 min

    Fractals

    Create endless detail with the Mandelbrot set, Julia sets and folding

  2. Lesson 27 · 55 min

    Tunnels and flight

    Build endless flights with 2D and 3D tunnels

  3. Lesson 28 · 55 min

    Directing with time

    Structure a demo with scenes, transitions and beat-synced motion

  4. Lesson 29 · 50 min

    Fast and small

    Learn what makes shaders slow, speed them up, and balance brevity with clarity

  5. Lesson 30 · 60 min

    Finish and share your demo

    Polish composition, color and motion, then publish and export your work