Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6d29e03
LR-BEHAV-RENDER-FIDELITY: process V8, Whites and the tone curves meas…
smi-leonivkovic Nov 10, 2026
1835f3a
LR-EDIT-COLOR-MIXER-HSL: process V8, the colour mixer measured agains…
smi-leonivkovic Nov 10, 2026
b16fd0c
LR-BEHAV-RENDER-FIDELITY: doc comments for the V8 curve stage, Gap 3 …
smi-leonivkovic Nov 11, 2026
3fd3930
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
a8280a6
LR-EDIT-COLOR-MIXER-HSL: test that V8 leaves the mixer to the mixer s…
smi-leonivkovic Nov 11, 2026
6cb4e5b
Merge remote-tracking branch 'origin/main' into lr-v8-tone
smi-leonivkovic Nov 11, 2026
9188e4d
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
815ebe6
LR-BEHAV-RENDER-FIDELITY: what's new names process 9 (#523)
smi-leonivkovic Nov 11, 2026
95b9016
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
fc55dde
LR-BEHAV-RENDER-FIDELITY: review fixes: neutral-render claims, Whites…
smi-leonivkovic Nov 11, 2026
92f35bb
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
c7c5ee2
LR-EDIT-COLOR-MIXER-HSL: review fixes: each slider's amount bracket o…
smi-leonivkovic Nov 11, 2026
5154467
LR-BEHAV-RENDER-FIDELITY: review fixes: measured curve tables only at…
smi-leonivkovic Nov 11, 2026
93c9132
Merge lr-v8-tone into lr-v8-color; review fixes: V1 to V8 also run th…
smi-leonivkovic Nov 11, 2026
7d20abd
LR-BEHAV-RENDER-FIDELITY: review fix: Calibration runs before the ton…
smi-leonivkovic Nov 11, 2026
b1f6a66
LR-EDIT-LIGHT-CURVE-PARAM: the parametric graph draws and drags the c…
smi-leonivkovic Nov 11, 2026
0bbd0fc
LR-BEHAV-RENDER-FIDELITY: review fixes: the chart tool refuses render…
smi-leonivkovic Nov 11, 2026
e0193c8
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
b0e9b29
Merge branch 'lr-v8-tone' into lr-v9-curve-graph
smi-leonivkovic Nov 11, 2026
6f565fe
LR-EDIT-LIGHT-CURVE-PARAM: review fixes: a graph drag searches the cu…
smi-leonivkovic Nov 11, 2026
a8b4d7e
LR-BEHAV-RENDER-FIDELITY: review fixes: the measured tables are read …
smi-leonivkovic Nov 11, 2026
00405c3
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 11, 2026
0b26397
Merge branch 'lr-v8-tone' into lr-v9-curve-graph
smi-leonivkovic Nov 11, 2026
8bec5c5
LR-EDIT-LIGHT-CURVE-PARAM: review fixes: doc comments on the graph's …
smi-leonivkovic Nov 11, 2026
3437e59
Merge remote-tracking branch 'origin/main' into lr-v8-tone
smi-leonivkovic Nov 14, 2026
099c0f9
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 14, 2026
5ba1722
Merge branch 'lr-v8-tone' into lr-v9-curve-graph
smi-leonivkovic Nov 14, 2026
14909c4
curve_stage: say in apply's doc that values above white are added bac…
smi-leonivkovic Nov 18, 2026
f54fd34
LR-EDIT-LIGHT-CURVE-PARAM: the parametric graph's fix from #4126 land…
smi-leonivkovic Nov 20, 2026
03de271
Merge origin/main into lr-v8-tone
smi-leonivkovic Nov 20, 2026
789c1a0
LR-BEHAV-RENDER-FIDELITY: Whites and the parametric regions are a fit…
smi-leonivkovic Nov 24, 2026
d1ce3c8
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Nov 24, 2026
c9dfb53
LR-EDIT-COLOR-MIXER-HSL: the colour mixer is a fitted model, not a me…
smi-leonivkovic Nov 24, 2026
7c0e8ea
Merge main into lr-v8-tone (#523)
smi-leonivkovic Dec 2, 2026
be29de8
Merge remote-tracking branch 'origin/main' into lr-v8-tone
smi-leonivkovic Dec 3, 2026
5ae163c
Merge lr-v8-tone (with main) into lr-v8-color (#523)
smi-leonivkovic Dec 3, 2026
1f53475
test(curve): the drag test allows the framework's drag threshold, not…
smi-leonivkovic Dec 3, 2026
4f01fd1
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Dec 3, 2026
ff7529a
Merge main into lr-v8-tone: the series moves to process V18 (#523)
smi-leonivkovic Dec 3, 2026
a85845d
test(proraw): V18's curve stage leaves Whites to the ProRAW chain; V1…
smi-leonivkovic Dec 3, 2026
2722f97
fix(curve_stage): Refine Saturation restores the colour after Whites …
smi-leonivkovic Dec 3, 2026
5a58233
fix(curve_input): under V18 sample where the curve stage reads (#523)
smi-leonivkovic Dec 3, 2026
de0c5a8
fix(tools): the tone charts' manifest carries the tool's prefix and f…
smi-leonivkovic Dec 3, 2026
ee3071e
Merge lr-v8-tone into lr-v8-color: the series moves to process V18 (#…
smi-leonivkovic Dec 3, 2026
023c93c
test(gpu): the curve-input prefix test names V17, where the sample is…
smi-leonivkovic Dec 3, 2026
e246094
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Dec 3, 2026
a8872ab
fix(curve_input): on ProRAW the sample's curve stage leaves Whites to…
smi-leonivkovic Dec 3, 2026
fbf3704
Merge lr-v8-tone into lr-v8-color; curve-stage.md names V18's colour …
smi-leonivkovic Dec 3, 2026
587ed53
docs: V17's Apple ProRAW uses its chain's fitted Whites, not V2 White…
smi-leonivkovic Dec 3, 2026
6f70731
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Dec 3, 2026
e382eef
docs(parity): the point curves keep LightCraft's spline shape; only h…
smi-leonivkovic Dec 3, 2026
fb876b1
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Dec 3, 2026
a596e99
test(curve_input): ProRAW Whites moves the rendered input histogram o…
smi-leonivkovic Dec 3, 2026
e2ee85b
Merge branch 'lr-v8-tone' into lr-v8-color
smi-leonivkovic Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions crates/develop/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,17 @@ pub enum Process {
/// V7, with the Highlights/Shadows base taken of log luminance without its fine detail (clamped
/// between a fine and a 3× wider median), so gaps in dark lettering aren't lifted into bright blocks.
V8,
/// V8, with Whites and the parametric curve measured against Lightroom, and the tone curves applied as
/// Lightroom does: Whites, the parametric and point curve hue-preserving in linear ProPhoto RGB, then the
/// red, green and blue curves per channel, before the colour stage (`lightcraft_pipeline::curve_stage`).
V9,
}

impl Process {
/// Every process, oldest first.
pub const ALL: [Process; 8] = [Process::V1, Process::V2, Process::V3, Process::V4, Process::V5, Process::V6, Process::V7, Process::V8];
pub const LATEST: Process = Process::V8;
pub const ALL: [Process; 9] =
[Process::V1, Process::V2, Process::V3, Process::V4, Process::V5, Process::V6, Process::V7, Process::V8, Process::V9];
pub const LATEST: Process = Process::V9;

pub const fn version(self) -> ProcessVersion {
match self {
Expand All @@ -119,6 +124,7 @@ impl Process {
Process::V6 => ProcessVersion(6),
Process::V7 => ProcessVersion(7),
Process::V8 => ProcessVersion(8),
Process::V9 => ProcessVersion(9),
}
}
}
Expand Down
46 changes: 32 additions & 14 deletions crates/gpu/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ const FIELDS: &[(&str, usize)] = &[
("SRGB_OFF", 1),
("CURVE_OFF", 1),
("CURVES", 1),
("STAGE", 1),
("STAGE_OFF", 1),
("STAGE_REFINE", 1),
("MSTAGE", 1),
("MSTAGE_OFF", 1),
("GAIN", 1),
("EV", 1),
("AIR", 1),
Expand Down Expand Up @@ -197,21 +202,29 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr
let srgb_off = aux.len();
aux.extend_from_slice(&srgb_lut()[..]);
let curve_off = aux.len();
if let Some(c) = &fp.curves {
for l in c {
if l.v.len() != CURVE_N as usize {
// a wrong-length curve would shift every later aux offset (CURVE_OFF, MASK_OFF and
// the mask terms that follow) and make the kernel read the wrong data. `fail()`
// records the failure on this thread so the render falls back to the CPU; the
// partial `(p, aux)` returned here is never bound to a pipeline.
fail(FailKind::Fatal, format!("curve table has {} entries, expected {}", l.v.len(), CURVE_N));
// `p` is only assembled below the curve loop, so an empty block is as good as any:
// the caller (render.rs) gates on `failed()` right after this returns and bails to
// the CPU fallback before indexing `p` or uploading `aux`.
return (Vec::new(), aux);
}
aux.extend_from_slice(&l.v);
let stage_off = curve_off + fp.curves.as_ref().map_or(0, |c| c.len() * CURVE_N as usize);
// process V9's stage (red, green, blue, then the base table) or the earlier processes' curves
let tables = fp.curves.iter().flatten().chain(fp.curve_stage.iter().flat_map(|c| c.chan.iter().chain([&c.base])));
for l in tables {
if l.v.len() != CURVE_N as usize {
// a wrong-length curve would shift every later aux offset (CURVE_OFF, MASK_OFF and
// the mask terms that follow) and make the kernel read the wrong data. `fail()`
// records the failure on this thread so the render falls back to the CPU; the
// partial `(p, aux)` returned here is never bound to a pipeline.
fail(FailKind::Fatal, format!("curve table has {} entries, expected {}", l.v.len(), CURVE_N));
// `p` is only assembled below the curve loop, so an empty block is as good as any:
// the caller (render.rs) gates on `failed()` right after this returns and bails to
// the CPU fallback before indexing `p` or uploading `aux`.
return (Vec::new(), aux);
}
aux.extend_from_slice(&l.v);
}
// process V9's mixer stage: its 9 chroma and 3 lightness keys, then its table
let mstage_off = aux.len();
if let Some(cs) = &fp.mixer_stage {
aux.extend(cs.chroma.iter().flatten());
aux.extend_from_slice(&cs.light);
aux.extend_from_slice(&cs.table[..]);
}
let mask_off = aux.len();
for m in masks {
Expand Down Expand Up @@ -258,6 +271,11 @@ pub fn finish_block(fp: &FinishParams, masks: &[[f32; MASK_TERMS]], present: &Pr
p.u("SRGB_OFF", srgb_off as u32);
p.u("CURVE_OFF", curve_off as u32);
p.b("CURVES", fp.curves.is_some());
p.b("STAGE", fp.curve_stage.is_some());
p.u("STAGE_OFF", stage_off as u32);
p.f("STAGE_REFINE", fp.curve_stage.as_ref().map_or(1.0, |c| c.refine));
p.b("MSTAGE", fp.mixer_stage.is_some());
p.u("MSTAGE_OFF", mstage_off as u32);
p.f("REFINE_SAT", fp.refine_sat);
p.f("GAIN", fp.gain);
p.f("EV", fp.ev);
Expand Down
136 changes: 136 additions & 0 deletions crates/gpu/src/wgsl/finish.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,134 @@ fn light_ops(d: vec3<f32>) -> vec3<f32> {
return mul3(PRO_TO_2020, p);
}

// `mixer_stage::level`: the lower and upper of three keys around `x` and the upper's weight, clamped.
struct CLevel {
a: u32,
b: u32,
f: f32,
}

fn mstage_level(k: vec3<f32>, x: f32) -> CLevel {
if (x <= k.x) {
return CLevel(0u, 0u, 0.0);
}
if (x <= k.y) {
return CLevel(0u, 1u, (x - k.x) / (k.y - k.x));
}
if (x <= k.z) {
return CLevel(1u, 2u, (x - k.y) / (k.z - k.y));
}
return CLevel(2u, 2u, 0.0);
}

// `MixerStage::look`, with the level keys at `keys` (9 chroma by lightness level, then 3 lightness) and the table
// after them: (hue shift, chroma factor, lightness change).
fn mstage_look(keys: u32, l: f32, c: f32, h: f32) -> vec3<f32> {
let t = keys + 12u;
let hd = ((h * 57.29577951308232) % 360.0 + 360.0) % 360.0 / 5.0;
let i0 = u32(hd) % 72u;
let i1 = (i0 + 1u) % 72u;
let fh = hd - floor(hd);
let lb = mstage_level(vec3<f32>(aux[keys + 9u], aux[keys + 10u], aux[keys + 11u]), l);
var r = array<vec3<f32>, 2>(vec3<f32>(0.0), vec3<f32>(0.0));
for (var j = 0u; j < 2u; j++) {
let m = select(lb.a, lb.b, j == 1u);
let ck = vec3<f32>(aux[keys + 3u * m], aux[keys + 3u * m + 1u], aux[keys + 3u * m + 2u]);
let cb = mstage_level(ck, c);
var v = vec3<f32>(0.0);
for (var o = 0u; o < 3u; o++) {
let r0 = t + ((m * 3u + cb.a) * 3u + o) * 72u;
let r1 = t + ((m * 3u + cb.b) * 3u + o) * 72u;
let a = aux[r0 + i0] * (1.0 - fh) + aux[r0 + i1] * fh;
let b = aux[r1 + i0] * (1.0 - fh) + aux[r1 + i1] * fh;
v[o] = a * (1.0 - cb.f) + b * cb.f;
}
if (c < ck.x) {
v.z *= max(c / ck.x, 0.0);
}
r[j] = v;
}
return r[0] * (1.0 - lb.f) + r[1] * lb.f;
}

// `MixerStage::apply`: the colour mixer, through OkLCh.
fn mixer_stage(d: vec3<f32>) -> vec3<f32> {
let lab = oklab(d);
let l = lab.x;
let c = sqrt(lab.y * lab.y + lab.z * lab.z);
// atan2(0, 0) is undefined in WGSL; the CPU's gives 0
let h = select(atan2(lab.z, lab.y), 0.0, c == 0.0);
let r = mstage_look(pu(F_MSTAGE_OFF), l, c, h);
let h2 = h + r.x;
let c2 = c * r.y;
return oklab_inv(vec3<f32>(max(l + r.z, 0.0), c2 * cos(h2), c2 * sin(h2)));
}

// A table of process V9's curve stage (`Lut1::eval`) at offset `o` in `aux`.
fn stage_lut(o: u32, x: f32) -> f32 {
let f = clamp(x, 0.0, 1.0) * f32(CURVE_N - 1u);
let i = min(u32(f), CURVE_N - 2u);
let t = f - f32(i);
return aux[o + i] + (aux[o + i + 1u] - aux[o + i]) * t;
}

// `CurveStage::apply`: the base table on the largest and smallest channel of sRGB-encoded linear ProPhoto, the
// middle one keeping its place between them in linear light, then the red, green and blue curves per channel.
fn curve_stage(d: vec3<f32>) -> vec3<f32> {
let p = mul3(PRO_FROM_2020, d);
var pc = clamp(p, vec3<f32>(0.0), vec3<f32>(1.0));
var e = vec3<f32>(srgb_exact(pc.x), srgb_exact(pc.y), srgb_exact(pc.z));
var hi = 0u;
var lo = 0u;
for (var k = 1u; k < 3u; k++) {
if (e[k] > e[hi]) {
hi = k;
}
if (e[k] < e[lo]) {
lo = k;
}
}
let off = pu(F_STAGE_OFF);
let base = off + 3u * CURVE_N;
let la = srgb_linear(stage_lut(base, e[hi]));
let lb = srgb_linear(stage_lut(base, e[lo]));
let pa = pc[hi];
let pb = pc[lo];
var curved = vec3<f32>(0.0);
for (var k = 0u; k < 3u; k++) {
var t = 1.0;
if (pa > pb) {
t = (pc[k] - pb) / (pa - pb);
}
curved[k] = stage_lut(off + k * CURVE_N, srgb_exact(clamp(lb + (la - lb) * t, 0.0, 1.0)));
}
var q = vec3<f32>(0.0);
for (var k = 0u; k < 3u; k++) {
q[k] = srgb_linear(clamp(curved[k], 0.0, 1.0));
}
let rs = pf(F_STAGE_REFINE);
if (rs < 1.0) {
// the saturation back towards the input's, at the curves' luminance
let rr = refine_saturation(e, curved, rs);
var r = vec3<f32>(0.0);
for (var k = 0u; k < 3u; k++) {
r[k] = srgb_linear(clamp(rr[k], 0.0, 1.0));
}
let yq = dot(q, PRO_Y);
let yr = dot(r, PRO_Y);
q = r;
if (yr > 1e-6) {
q = r * (yq / yr);
}
}
for (var k = 0u; k < 3u; k++) {
if (p[k] > 1.0) {
q[k] += p[k] - 1.0;
}
}
return mul3(PRO_TO_2020, q);
}

fn band_weights(h: f32) -> array<f32, 8> {
var w: array<f32, 8>;
for (var i = 0u; i < 8u; i++) {
Expand Down Expand Up @@ -664,6 +792,14 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
d = light_ops(d);
}

// --- process V9: the colour mixer, then Whites and the tone curves
if (pu(F_MSTAGE) != 0u) {
d = mixer_stage(d);
}
if (pu(F_STAGE) != 0u) {
d = curve_stage(d);
}

// --- colour
d = color_ops(d, lt[11], lt[12]);
if (tint_on) {
Expand Down
73 changes: 73 additions & 0 deletions crates/gpu/tests/it/equivalence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,79 @@ fn light_v3_operators_match() {
}
}

/// Process V9's curve stage: Whites, the parametric curve, the point curves and Refine Saturation, on a camera curve
/// and without one, in SDR and HDR.
#[test]
fn curve_stage_matches() {
if !gpu() {
return;
}
use lightcraft_geom::Point;
let src = scene(0, 960, 640);
let curve = lightcraft_pipeline::tone::CameraTone::new(std::array::from_fn(|i| {
let x = 0.004 * 1.18f32.powi(i as i32);
[x, 1.0 - (-2.0 * x).exp()]
}))
.unwrap();
let raw = SourceInfo { raw: true, camera_tone: Some(curve), ..Default::default() };
let req = RenderRequest::fit(720, 720);
let v9 = || DevelopSettings { process: Process::V9.version(), ..Default::default() };
for v in [-100.0, -30.0, 40.0, 100.0] {
let mut s = v9();
s.light.whites = v;
check(&format!("V9 Whites {v}"), &src, &raw, &s, &req);
}
let mut s = v9();
s.curve.highlights = -40.0;
s.curve.lights = 25.0;
s.curve.darks = -15.0;
s.curve.shadows = 30.0;
check("V9 parametric", &src, &raw, &s, &req);
s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.55 }, Point { x: 1.0, y: 0.95 }];
s.curve.red = vec![Point { x: 0.0, y: 0.0 }, Point { x: 0.4, y: 0.5 }, Point { x: 1.0, y: 1.0 }];
s.curve.blue = vec![Point { x: 0.0, y: 0.1 }, Point { x: 1.0, y: 0.9 }];
s.light.whites = -25.0;
check("V9 curves", &src, &raw, &s, &req);
s.curve.refine_saturation = 30.0;
check("V9 Refine Saturation", &src, &raw, &s, &req);
check("V9 curves, no camera curve", &src, &SourceInfo::default(), &s, &req);
s.curve.split_mid = 40.0;
check("V9 other splits", &src, &raw, &s, &req);
s.curve.split_mid = 50.0;
s.hdr.enabled = true;
s.hdr.max_ev = 2.0;
check("V9 HDR preview", &src, &raw, &s, &req);
}

/// Process V9's mixer stage matches the CPU's, alone, with Calibration (still V7's operator), with the curve
/// stage after it, and with V7's colour tools (Saturation, B&W) that still follow.
#[test]
fn mixer_stage_matches() {
if !gpu() {
return;
}
let src = scene(0, 960, 640);
let raw = SourceInfo { raw: true, ..Default::default() };
let req = RenderRequest::fit(720, 720);
let v9 = || DevelopSettings { process: Process::V9.version(), ..Default::default() };
let mut s = v9();
s.mixer.orange.sat = -60.0;
s.mixer.blue.hue = -40.0;
s.mixer.green.lum = 70.0;
s.mixer.magenta.hue = 15.0;
check("V9 mixer", &src, &raw, &s, &req);
s.calibration.red_hue = 45.0;
s.calibration.blue_sat = 60.0;
s.calibration.shadows_tint = 30.0;
check("V9 mixer and calibration", &src, &raw, &s, &req);
s.curve.master = vec![Point { x: 0.0, y: 0.05 }, Point { x: 0.5, y: 0.6 }, Point { x: 1.0, y: 0.95 }];
s.color.saturation = 20.0;
check("V9 colour stage, curves, Saturation", &src, &raw, &s, &req);
check("V9 colour stage, not raw", &src, &SourceInfo::default(), &s, &req);
s.treatment = lightcraft_develop::Treatment::Bw;
check("V9 colour stage, B&W", &src, &raw, &s, &req);
}

/// Issue #632: the Highlights / Shadows base of each process (V1: the edge-aware filter of log
/// luminance; V2 to V7: of its fine median, V8 on: of its detail-free plane, a radius that grows with the render) matches the CPU's, and
/// a warm cache never hands one process the other's base.
Expand Down
20 changes: 18 additions & 2 deletions crates/pipeline/src/colorops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ impl ColorOps {
hue: bands.map(|b| (b.hue / 100.0) as f32 * 0.5),
sat: bands.map(|b| (b.sat / 100.0) as f32),
lum: bands.map(|b| (b.lum / 100.0) as f32 * 0.18),
mixer: !s.mixer.is_neutral(),
// from process V9 the colour stage applies the mixer (`crate::mixer_stage`)
mixer: !s.mixer.is_neutral() && s.process.process() < lightcraft_develop::Process::V9,
points: if crate::is_bw(s) {
Vec::new()
} else {
Expand Down Expand Up @@ -366,7 +367,8 @@ mod tests {

#[test]
fn mixer_targets_its_band() {
let mut s = DevelopSettings::default();
// V7's mixer (from V9 the colour stage applies it: `crate::mixer_stage`)
let mut s = DevelopSettings { process: lightcraft_develop::Process::V7.version(), ..DevelopSettings::default() };
s.mixer.blue.sat = -100.0;
let ops = ColorOps::new(&s);
let blue = [0.02, 0.05, 0.4];
Expand All @@ -378,6 +380,20 @@ mod tests {
assert!((cr - cr0).abs() < 0.01);
}

#[test]
fn v8_leaves_the_mixer_to_the_mixer_stage() {
// from V9 `crate::mixer_stage` applies the mixer, so `ColorOps` must not apply it again
let mut s = DevelopSettings { process: lightcraft_develop::Process::V7.version(), ..DevelopSettings::default() };
s.mixer.blue.sat = -100.0;
assert!(ColorOps::new(&s).mixer);
// V8 (the Highlights/Shadows base change) still applies the earlier mixer, and has no mixer stage
s.process = lightcraft_develop::Process::V8.version();
assert!(ColorOps::new(&s).mixer);
assert!(crate::mixer_stage::MixerStage::new(&s).is_none());
s.process = lightcraft_develop::Process::V9.version();
assert!(!ColorOps::new(&s).mixer);
}

#[test]
fn calibration_keeps_white_and_moves_primaries() {
assert!(calibration_matrix(&Calibration::default()).is_none());
Expand Down
Loading