Command Palette

Search for a command to run...

Hectal
Phase 14: Under the Hood: Raw WebGL 2 and WebGPU
3D Web · Exercise 1 of 4Next
Advanced

Fix the fragment shader

The triangle should be Lumen orange, but nothing is drawn: the console shows the compiler's info log.

Read the two ERROR lines and fix the fragment shader so it compiles. Don't change the JavaScript.

What Check tests

  1. The shaders compile (no "compile failed" in the console)
  2. The middle of the canvas is Lumen orange (255, 107, 44)
  3. The corner is still the stage colour

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.