Measure the white balance probe in camera RGB, where the gains multiply

Pressing "pick" and clicking a near-neutral wall on a Canon 6D frame set
tint to -77 and turned the whole photograph green. The white balance
operation runs first in the chain, on camera RGB, before the body's base
curve and colour matrix; the probe was read off a display render after
all three, and the solve treated that sRGB triple as if the gains
multiplied it directly. On a JPEG the two spaces coincide, which is why
the existing tests passed while the picker was broken on every raw file.

The probe now reads the camera-space tap a merge stitches from, composed
under the edit's own framing so a fraction of the canvas is a fraction of
the probe, and puts the as-shot balance on itself - exactly the value the
operation's gains are about to multiply. No operations run in the tap, so
nothing has to be stripped and restored, and the display target is left
alone, so a sample that found nothing usable no longer needs a redraw.

A raw-frame test with the 6D's matrix and a typical as-shot balance
samples a warm grey and asserts the rendered pixel comes back neutral; it
fails on the previous probe.
This commit is contained in:
2026-09-20 13:41:11 +02:00
parent 764ad55ead
commit 2f47087223
6 changed files with 203 additions and 96 deletions
+11
View File
@@ -857,6 +857,17 @@ impl EditGraph {
crate::operation::compose_camera_linear(&self.warps, self.framing.baseline(), view)
}
/// TRACES: FR-DEV-3
/// The camera-space tap under this edit's own framing — crop, view,
/// rotation and all — so a fraction of what is on the canvas is a
/// fraction of what this renders. Nothing else of the edit: no
/// operation, no mask, no repair. See
/// [`crate::operation::compose_camera_probe`] for why the white balance
/// picker reads from here and not from the display.
pub fn compose_camera_probe(&self) -> ComposedShader {
crate::operation::compose_camera_probe(&self.warps, &self.framing)
}
/// TRACES: FR-DEV-19c
/// [`Self::compose_for`], with one layer's mask drawn over the picture.
///