Alt/Option-drag previews for clipping and sharpening

Holding Alt (Option on macOS) while dragging an Edit slider shows
Lightroom's temporary previews: highlight clipping for Exposure,
Highlights and Whites, shadow clipping for Shadows and Blacks, greyscale
for Sharpening Amount, the detail band for Radius / Detail and the
sharpening mask for Masking. They are render overlays (pipeline
visualize), drawn the same way after the CPU and GPU renderers; the
sharpening views read each renderer's own detail planes. Settings and
normal output are unchanged.

Fixes #937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fabio Lussi
2026-10-11 17:25:47 +02:00
co-authored by Claude Opus 5.5
parent 76b5377868
commit 9ac38222e1
14 changed files with 382 additions and 25 deletions
+8
View File
@@ -747,6 +747,14 @@ pub fn render(
lightcraft_pipeline::masks::evaluate_one(m, &plan.frame, w, h, &img, &l, s.light.exposure as f32, plan.mattes.as_deref())
}
});
// a sharpening view: the detail planes this render sharpened with
let overlay_mask = overlay_mask.or_else(|| {
req.overlay.reads_detail().then(|| {
let l = host.log_l.get_or_insert_with(|| Arc::new(cx.read_plane(&prep.log_l, w, h))).clone();
let tex = prep.texture.as_deref().map(|b| cx.read_plane(b, w, h));
lightcraft_pipeline::visualize::sharpen_plane(req.overlay, &plan.settings, &l, tex.as_ref(), plan.px_per_long)
})?
});
lightcraft_pipeline::visualize::apply(&mut image, req.overlay, &plan, overlay_mask.as_ref());
// spots grew the window the render worked on: cut it back to the request
if let Some(k) = plan.keep {