Geometry

Shapes made of triangles, the way most 3D on a screen is drawn: a grid bent by a vertex shader into water, cloth or a planet, with nearer triangles hiding farther ones.

Take them in this order: each one uses what the ones before it showed. The same shaders, newest first, are on the topic’s page.

Sign in and the exercises you pass are marked here. Nothing is kept otherwise.

  1. Step 1 of 5

    Rippling Water

    Rain on still water under a sky lit like a kiln. The first episode drawn by a vertex shader, it lifts every corner of a 320 by 320 grid to the height of the water there. Each drop starts a band of rings that spreads, weakens and fades, the rings add up where they cross, a slow swell rolls under them, and the surface mirrors the sky as much as its angle allows. Every ring starts with a plink of its own.

    Teaches: A vertex shader displacing a grid

    Builds on Cracked Clay

    6 exercises
    1. One ring Make this step
    2. Raindrops Make this step
    3. A mirror of the sky Make this step
    4. Rippling water Finish it
    5. Match the sliders Find the values
    6. Find the bug Put it right
  2. Step 2 of 5

    Flag in the Wind

    A flag with the kiln's mark on it, flying from a pole against an evening sky. A vertex shader turns a flat grid into cloth, pinned at the pole and waving more the farther it is from it; every corner finds which way the cloth faces by asking where its neighbors are, and the low sun behind the flag shines through the folds that turn away from it.

    Teaches: Vertex waves, normals from neighbors, two-sided light

    Builds on Cracked Clay, Glass Orb, Rippling Water

    6 exercises
    1. Waves Make this step
    2. Normals from neighbors Make this step
    3. Two sides Make this step
    4. Flag in the wind Finish it
    5. Match the sliders Find the values
    6. Find the bug Put it right
  3. Step 3 of 5

    Spinning Planet

    A planet turning in the dark under a low sun. A vertex shader wraps a flat grid round a ball, longitude across and latitude down, and lifts its continents out of fractal noise read in three dimensions, so the grid's seam closes without a crack. Sea, land, ice and cloud are colored per pixel, cities light the night side, and the air glows blue at the rim and ember at dusk.

    Teaches: A grid wrapped into a sphere, continents from noise, an atmosphere rim

    Builds on Cracked Clay, Kiln Fire, Rippling Water, Flag in the Wind

    5 exercises
    1. Continents from noise Make this step
    2. The air Make this step
    3. Spinning planet Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right
  4. Step 4 of 5

    Crystal Bloom

    A cluster of crystals growing out of a dark rock, made by mesh shaders. The geometry is made fresh every frame in 96 pieces, a rock and 95 crystals, and each crystal adds rings of corners as it grows, so how many triangles it has changes from one frame to the next. The growing tips burn white-hot, grown crystals cool to gold, and each one chimes as it finishes, then later melts back into the rock and grows again.

    Teaches: Geometry made on the GPU with mesh shaders

    Builds on Kaleidoscope, Cracked Clay, Rippling Water, Flag in the Wind

    5 exercises
    1. A crystal Make this step
    2. A cluster Make this step
    3. Growing Make this step
    4. Match the sliders Find the values
    5. Find the bug Put it right
  5. Step 5 of 5

    Ocean Waves

    An open sea at dusk under a sky lit like a kiln's mouth. Eight Gerstner waves move every corner of a 384 by 384 grid in circles, so the crests sharpen and the troughs widen as real swell does; where they add up and the surface bunches together, foam gathers, and the water mirrors the glowing sky as much as its angle allows. The surf you hear is the same sea, heard at three points ahead.

    Teaches: Gerstner waves on a grid, foam on the crests, the sky in the water

    Builds on Flowing Color Field, Cracked Clay, Rippling Water, Flag in the Wind, Crystal Bloom

    6 exercises
    1. A Gerstner wave Make this step
    2. Eight waves Make this step
    3. The sky in the water Make this step
    4. Ocean waves Finish it
    5. Match the sliders Find the values
    6. Find the bug Put it right

Other paths Start here Noise & Texture Shapes & Symmetry 3D Scenes Particles & Simulation Light & Materials Atmosphere Fractals Sound & Rhythm