Color grading and look development on the GPU
Learning objectives
- learner can build smooth procedural palettes with cosine-RGB and HSB polar mapping
- learner can apply gamma correction from the start of a look-dev workflow
- learner can grade output with pow contrast and S-curve for a filmic look
- learner can drive a start-saturated look-dev workflow, pushing hues past comfortable and pulling back with fresh eyes
Capstone — one whole task that evidences the objectives
Develop the color look for a procedural shader scene: build a cosine-RGB palette, render an HSB color wheel, and grade the final image with gamma, pow-contrast, and an S-curve, documenting a start-saturated workflow.
Prerequisite modules
In a live-coded visual set, color is the fastest lever you have: the same raymarched blob reads as toxic rave acid or warm ambient dusk depending purely on palette and grade. This module builds the whole task of look development — taking an already-animated procedural scene from your VJ rig and giving it an intentional, performance-ready color identity, the way a colorist grades a film after the edit is locked.
The arc starts supported. First, generate color from a single scalar using three phase-offset cosine waves — the atom on cosine-RGB palettes is your JIT pointer for what a, b, c, d each do, and interactive palette pickers keep this first exercise low-stakes. Next, prove you understand color spaces by rendering an HSB color wheel via atan and length, following “Mapping HSB to polar coordinates” step by step. Then the grading chain: turn on gamma correction immediately (per “Gamma correction must be applied from the start”), add a mild pow-contrast to separate dark detail, and finish with a smoothstep S-curve for the filmic snap. The capstone strips the supports: you develop a complete look on your own scene and write up a start-saturated workflow — pushing hues past comfortable on day one and pulling back with fresh eyes, per IQ’s principle.
Each required atom gates a capstone deliverable: no cosine formula, no palette; no polar mapping, no wheel; no gamma/pow/S-curve, no grade; no start-saturated principle, no documented workflow. The supporting atoms enrich rather than gate — mix() gives you an easier interpolation fallback, and the grouping-over-scatter principle previews how your graded palette will sit in a fuller composition.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
noise-field
noise(4, 0.1).out()
hydra-0002 · CC0-1.0
float h21(vec2 p){return fract(sin(dot(p,vec2(12.9898,78.233)))*43758.5453);}
glsl-0013 · public-domain
palette-cycle
osc(30, 0.1, 1).colorama(0.1).out()
hydra-0015 · CC0-1.0
hsvrgb [fract (ft/6.28 + 0.1*time), 1, 1] >> rgb
punctual-0024 · CC0-1.0
polar-warp
float r = length(uv); float a = atan(uv.y, uv.x);
glsl-0008 · public-domain
[rtx [fr, ft + 0.2*time], rty [fr, ft], 0.5] >> rgb
punctual-0032 · CC0-1.0
gamma-correction
col = pow(col, vec3(1.0/2.2));
glsl-0021 · public-domain
pow ([lo,mid,hi]) 0.4545 >> rgb
punctual-0034 · CC0-1.0
outline-stroke
(circle 0 0.42 - circle 0 0.38) >> add
punctual-0019 · CC0-1.0
value-contrast
stroke(255); fill(0); rect(0, 0, w, h)
p5live-0027 · CC0-1.0
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- Live Visualist — zero to performing live-coded & generative visuals — Reactive & procedural — make it listen, and go to the GPU recommended
- Shader Artist — real-time GPU craft to a demoscene-grade visual — Procedural fields and the color look required
Unlocks — modules that require this one