What a shader actually is
A tiny program the GPU runs once for every pixel, to decide its color.
A shader is a small program that runs on the GPU. The kind you will write here is a fragment shader (also called a pixel shader): the GPU runs it once for every pixel on the screen, in parallel, and each run outputs one thing — the color of that pixel. That is the whole model. There is no loop over pixels that you write; the GPU calls your code for each pixel at the same time, which is why shaders are fast enough to run every frame.
In GLSL (the shader language), you write a function called main(), and you set the special output gl_FragColor to a color. A color is a vec4 — four numbers from 0 to 1: red, green, blue, and alpha (opacity). vec4(1.0, 0.0, 0.0, 1.0) is opaque red.
Here is a complete shader. Edit the numbers and watch the preview change instantly — this is real GLSL running in your browser.
Now your turn. Every exercise in this course is graded by actually running your shader and comparing what it draws to the solution — not by checking your text. Make the screen the same warm orange.
Make the whole screen a warm orange.
Set gl_FragColor to the color red 0.9, green 0.45, blue 0.15, alpha 1.0.