Command Palette

Search for a command to run...

Hectal
Phase 12: Shaders with GLSL
3D Web · Exercise 2 of 5 PreviousNext
Advanced

Draw a soft orange circle

Draw an orange circle (vec3(1.0, 0.42, 0.17)) of radius 0.3 in the middle of the plane, with black outside. Use length(vUv - 0.5) and smoothstep so the rim is soft.

What Check tests

  1. The centre is orange
  2. The corner is black
  3. The rim is soft: a pixel near the edge is between black and orange

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.