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.
- Colour from position: a gradient from each pixel's position, and the colour picker.
- Moving with time:
iTime, waves and a cosine-palette shimmer. - Shapes: centred coordinates, circles from distances, and
smoothstepedges. - The timeline: animating
iFloat0andiFloat1, transition types, and the length. - Patterns: tiling with
fract, rotation, and polar coordinates. - Textures: showing, warping and folding an image.
- Memory with iPrevFrame: trails that fade, and setting up the first frame with
iFrame. - Buffers: a heat map that a moving dot paints into a buffer, spreading it out, and the shared.glsl tab.
- 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 asiCanvas2D. - 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.