A-01Series A
Shaping Functions
Mastering step, smoothstep, sin, cos, and curve shaping.
Interactive Live Editoru_time • u_resolution • u_mouse
Speed:
GLSL OK
u_resolution | u_time | u_mouse
Chapter Concepts & Exercises
Shaping functions are the fundamental building blocks of procedural patterns.
- `step(edge, x)`: Hard threshold (returns 0 or 1).
- `smoothstep(min, max, x)`: Smooth Hermite interpolation between edges.
- `pow(x, n)`: Non-linear power curve for gamma and contrast.