From acf582251f3f0e4359360fe58f11db3a18bbc3d9 Mon Sep 17 00:00:00 2001 From: Brian Hursey Date: Sat, 28 Nov 2026 15:42:24 +0000 Subject: [PATCH] Give every mask its own tone curve. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Local masks could only shift tone globally, so a burnt sky or a backlit face had to fight the frame-wide sliders. Each mask now carries an RGB point curve, applied to the masked pixels before the mask blend. All eight curves ride in one 256×8 LUT texture, so the grade shader needs a single extra sampler rather than eight. Masks saved before this exist migrate to an identity curve, so old edits keep their look; the render check fails if the curve stops reaching the grade, and a unit test pins the LUT's identity, per-row isolation and monotonicity. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- scripts/render-check.mjs | 32 ++++++++++++++++++++- src/components/Panels.tsx | 7 +++++ src/gl/renderer.ts | 58 +++++++++++++++++++++++++++++++++++++- src/lib/edits.ts | 19 +++++++++++++ src/lib/localCurve.test.ts | 40 ++++++++++++++++++++++++++ src/types.ts | 5 ++++ 6 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 src/lib/localCurve.test.ts diff --git a/scripts/render-check.mjs b/scripts/render-check.mjs index 1067f36..ced4bc9 100644 --- a/scripts/render-check.mjs +++ b/scripts/render-check.mjs @@ -96,7 +96,7 @@ const PAGE_HTML = `