Skip to content

Wide-gamut working space (approach C, stub)

Wide-gamut working space (approach C): stub

Section titled “Wide-gamut working space (approach C): stub”

Status: planned, not designed. Chris (2026-10-11) chose approach A (2026-10-11-hdr-p3-palette-design.md) now, with C as a later step. This stub records the scope so a future session starts from A’s foundations instead of from scratch.

Render the whole HDR frame in linear Display P3 instead of linear Rec.709. Colours are authored in P3, sRGB textures are converted when sampled, and the tonemap and glow run natively in P3. The output converts to the layer’s colour space once, at the blit.

  • ColorGamut (OKLCH maths, matrices; widen(..., target) already takes a target gamut).
  • Viewport.output_gamut with the reserved OUTPUT_GAMUT_P3_WORKING enum value.
  • The shared sRGB↔P3 .glsl include, plus the P3-space tonemap, glow and blit clamps.
  • The ColorGamut.active() coupling and the HDR-only tunables.
  • Texture handling: convert every sRGB texture sample in the canvas shader, or bake P3 assets?
  • Which canvas shaders and materials assume Rec.709 primaries (additive_mat, the neon looks, backdrop generators)?
  • The cost of a per-sample matrix on the A12-class ATV.
  • Does C’s visible gain over A justify the work? Measure A on device first.
  • Interaction with approach A’s per-source widening: retire widen, or keep it as the authoring path.

A has shipped and Chris has judged it on device, and either a visible limit of A remains (textured sprites and mixed colours stay sRGB) or a new art direction wants P3-authored assets.