Milestone 0: pass-through
Every Milestone hides a picture in an Encoded Asset: a copy of the picture that has been scrambled by a recipe, a list of steps given below. Your shader decodes it, and the picture appears. This first one has no encoding at all: it isn't scrambled, so your shader only has to draw it.
The recipe
Encoding: none. The Encoded Asset is the picture itself. Pixel (x, y) of the picture is pixel (x, y) of the Encoded Asset.
Decoding: draw pixel (x, y) of the Encoded Asset at the same place on the canvas.
- The picture is W × H = 512 × 168 pixels, with rows counted from the bottom.
Your shader
Your input is u_encodedAsset: the Encoded Asset, the picture your shader reads and decodes.
A shader here is a fragment shader: a small program that runs once for every pixel of the canvas, the picture area at the top of the editor, and sets that pixel's colour by assigning it to gl_FragColor. The editor below runs yours again every time you type, and shows any errors next to the line they're on. The starter shader paints every pixel navy. Make each pixel show the matching pixel of the Encoded Asset instead.
Your shader also gets u_canvasResolution, the size of the canvas in device pixels: the dots on the screen, which can be two or more for every pixel the page asks for. u_encodedAsset is a texture: a picture a shader can read colours from. To draw it, each pixel turns its position on the canvas, gl_FragCoord, into a position on the texture, then reads the colour there with texture2D. Drawing a texture shows how, and runs it live.
You'll know when you've solved it: the canvas will show this picture. Every later Milestone hides a picture like this one, and you won't see it until your shader decodes it.