smoothstep.io docs Open smoothstep.io

Tutorial

The tutorial is part of the app. Start it at smoothstep.io/#tutorial, or choose Help → Tutorial. It opens a new animation with the lessons beside the editor, and each step notices when you've done it.

  1. Colour from position: a gradient from each pixel's position, and the colour picker.
  2. Moving with time: iTime, waves and a cosine-palette shimmer.
  3. Shapes: centred coordinates, circles from distances, and smoothstep edges.
  4. The timeline: animating iFloat0 and iFloat1, transition types, and the length.
  5. Patterns: tiling with fract, rotation, and polar coordinates.
  6. Textures: showing, warping and folding an image.
  7. Memory with iPrevFrame: trails that fade, and setting up the first frame with iFrame.
  8. Buffers: a heat map that a moving dot paints into a buffer, spreading it out, and the shared.glsl tab.
  9. Draw with JavaScript: the Canvas2D layer, writing the time, shapes with drawList, lists inside lists that turn only part of the drawing, and a shader that reads the drawing as iCanvas2D.
  10. Share it: saving, sharing a link, downloading and exporting video, and where to learn more.

Each lesson builds one animation a step at a time. Most end with challenges to try on your own, with hints but no answers, and a related example to explore.

The lessons are in src/tutorial/lessons.tsx, and their shaders in src/tutorial/shaders.ts.

Shaders

Animations in smoothstep.io are fragment shaders, written in the WebGL 2 shader language (GLSL). A shader works out the colour of every pixel of each frame in parallel, from the pixel's position and inputs like iTime. Your computer can run it on its graphics card, so animations play fast, and you can always export them at any frame rate, even ones that don't play in real time.

As you learn GLSL, click a function like smoothstep or an input like iTime in the editor to see what it does.

Shadertoy

smoothstep.io is partly modelled on Shadertoy, with extra features for making animations. Much of what's written about Shadertoy applies here, and a lot of Shadertoy code runs in smoothstep.io with little or no change. TheArtofCode's Shadertoy tutorials on YouTube are a good place to start.