Learning path · 14 lessons · about 3 hours

Shader art basics

You will: make patterns, shapes and animations that look good. For: artists and designers who want to start creating with shaders.

A gentler route that stays in 2D and goes for pictures you will want to share: soft shapes, repeating patterns, polar designs and colour. It skips the 3D maths and keeps the focus on composition, rhythm and colour, with every step producing something you can look at.

Start lesson 1

What you will be able to do

  • Draw crisp, soft-edged shapes from distance fields
  • Tile and repeat patterns
  • Make polar designs: flowers, stars, rays
  • Colour everything with cosine palettes

The lessons, in order

  1. 1
    Every pixel, one function

    Make the whole screen the same blue as the target.

    Play
  2. 2
    Colors are four numbers

    Match the green. The Colors panel shows its hex code — convert it to floats.

    Play
  3. 3
    Two axes

    Red grows to the right, green grows upward, blue is a constant 0.5.

    Play
  4. 4
    Vectors & swizzling

    Swap the roles: red should follow the vertical axis and green the horizontal one.

    Play
  5. 5
    smoothstep(): soft edges

    Instead of a hard split, fade from the dark color to the orange between x = 0.3 and x = 0.7.

    Play
  6. 6
    Center, distance & aspect ratio

    Make the circle truly round by correcting for the aspect ratio.

    Play
  7. 7
    Distance fields & antialiasing

    Turn the solid disc into a glowing ring: radius 0.3, soft edge width 0.02.

    Play
  8. 8
    Repeating: floor & frac

    Draw an 8×6 checkerboard of black and white.

    Play
  9. 9
    Moving a shape (the key trick)

    Draw the yellow disc (radius 0.2) centred 0.3 to the right and 0.15 up from the middle.

    Play
  10. 10
    Scaling a shape

    Draw a box (half-size 0.1 by 0.08) and stretch it to twice the width by dividing p.

    Play
  11. 11
    Rotation & matrices

    Spin the box: rotate p by an angle equal to time (in radians) before computing the distance.

    Play
  12. 12
    Polar coordinates

    Build the spinning pinwheel: wedge pattern sin(a × 6 + time × 2), clipped to a disc of radius 0.4 with a…

    Play
  13. 13
    Cosine palettes

    Make a rainbow that scrolls: t = uv.x + time × 0.2.

    Play
  14. 14
    Time: make it move

    Make the ring pulse: radius = 0.25 + 0.08 × sin(time × 3).

    Play

Ideas you will meet

Short explainers with a live example for each:

See all learning paths