10 Commits

Author SHA1 Message Date
bhursey fb43ca8e99 Make the mask tint a view toggle and mask local detail in source space
The mask overlay was always painted while the mask tool was open, at a fixed
strength; it is now a persisted view toggle (O or the Mask button) with its own
strength slider, so the photo underneath stays readable. The mask HUD also
gains + and - so a brush can erase and a shape can subtract without leaving the
canvas.

Local texture, clarity, dehaze and sharpen sampled the baked masks at the view
coordinate in the finish pass, so their coverage slid off the subject under a
crop or zoom. The grade pass now writes each pixel's source coordinate to a
second render target and the finish pass reads the masks through it, which also
follows straightening and lens correction.

The render gate checks the tint and a local dehaze amount through a quarter
frame crop and a synthetic lens warp, plus the tint strength and toggle.
2026-11-28 17:39:31 +00:00
bhursey 46dcc231a7 Show the baked local mask in the develop view instead of a drawn band.
The overlay redrew every stroke as a flat translucent band, so the feather
never appeared and the guide did not match the shape it stood for. The
develop view now tints the selected layer's baked mask, sampled with the
same source uv the adjustments use: the preview follows crops,
straightening, zoom, lens correction, subtract shapes and the feather
exactly as the mask stores it. Only the stroke still under the pointer is
drawn, as a preview of what will be baked, and the histogram is left
alone while a tint is showing.

The render gate now checks the overlay ranks its tint from the dab core
through the feathered rim to untouched pixels outside the brush circle.
2026-11-28 17:14:00 +00:00
bhursey 69a327cd45 Draw brush masks with a soft dab inside the brush circle.
Feathering blurred a copy of the stroke and unioned it with the hard
stroke, so coverage stayed at full strength across the whole stroke and
then continued as a halo past the brush outline. The adjustment visibly
spilled outside the brush circle and its rim read as a step rather than a
falloff.

Each stroke is now stamped with a dab that is solid out to 1 - feather of
its radius and fades to nothing at the rim, so the mask follows the brush
circle and softens smoothly at any size. The render gate measures the
dab's core, its rim and the area just outside the circle.
2026-11-28 16:47:49 +00:00
bhursey b884616889 Group local mask shapes into editable components.
A local adjustment is now a list of shapes composited in order (add, subtract,
intersect) instead of a single shape, so dodging and burning can be built from
several brushes, gradients and auto masks without spending layer channels.
Existing edits migrate on load: the flat layer fields become components[0],
keeping geometry, invert, feather and the layer's blend mode unchanged. The
panel gains a shape list with active-shape editing, and the render gate now
asserts a subtract shape clears the group while an intersect keeps it.
2026-11-28 16:09:14 +00:00
bhursey acf582251f Give every mask its own tone curve.
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 <noreply@codebuff.com>
2026-11-28 15:42:24 +00:00
bhursey 6e80699829 Show the shadow palette in the clipping legend and pin both overlay checks.
The shadow warning gained per-channel colours but the legend only explained the
highlight palette, so the new marks had no key. The legend now switches to the
shadow palette whenever shadow clipping is on, listing one channel, the three
two-channel colours and all three. The render check also fails if the shadow
overlay stops following Exposure, the way the highlight side already did.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:58:03 +00:00
bhursey a67e9ef458 Name the channels in the shadow clipping warning too.
Shadow warnings were a flat blue, so a single crushed channel looked the same as
all three. The shadow branch now uses the highlight palette: red/green/blue for
one channel, yellow (red+green), magenta (red+blue) and cyan (green+blue) for
pairs, white for all three. The render check covers both ends of the range, and
`npm run predeploy` chains typecheck, tests, the render check and the build so a
shader regression cannot reach a deploy.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:40:50 +00:00
bhursey a6491f6ef6 Show the clipping overlay's per-channel colours and follow the sliders.
The overlay had been collapsed to a single highlight bit, so every warning was
white. It now reads the finished frame per channel again: red for one clipped
channel, yellow for two, white for all three, and it updates as Exposure or
Recovery moves, which is what holding Ctrl is for. The render check renders the
overlay and asserts both the colours and that +6 EV turns a clear band white.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:38:48 +00:00
bhursey fe9d2aff3f Name the clipped channels in the Ctrl clipping overlay again.
0c113e7 packed clipping into two alpha states (shadow / highlight), so the finish
pass could only paint white even though the legend still promised red, green,
blue and yellow. The grade pass now writes a 4-bit code (R/G/B + shadow) into
alpha and the overlay paints the channels it actually lost: red for one, yellow
for two, white for all three. The render check renders the overlay so this
cannot regress silently.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:35:30 +00:00
bhursey 1e7ec0cf15 Add a headless render check for the 16-bit sidecar swap.
The proxy and sidecar reach the GPU through different upload paths, and whether
they agree depends on UNPACK_FLIP_Y_WEBGL being ignored for ImageBitmap. A unit
test cannot see that, so the picture could silently start flipping again. The
check encodes a two-tone sidecar with the server's encoder, serves it beside the
matching JPEG and measures the rows that land in a WebGL2 texture in headless
Chrome.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:30:36 +00:00