mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
RenderRequest gains an output space (default sRGB; previews stay sRGB). The per-pixel stage converts scene-linear Rec.2020 to the target primaries, gamut-maps into the target gamut and encodes with the target curve, on CPU and GPU (WGSL finish kernel reads the matrix, luma weights and curve from its parameter block). sRGB output is byte-identical to before on the CPU. Export embeds our own generated ICC profile for the space; AVIF stays sRGB. ExportOptions.colorSpace, export dialog and MCP export schema. Tests: P3 colour survives a P3 export (decoded through the embedded profile), every space/format round-trips its profile, GPU equivalence per space. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>