Repository navigation
LR-EDIT-LIGHT-HIGHLIGHTS: process V9, Highlights as strong as Lightroom's (#1371) - #4480
Bruno-Alumn wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
I measured this PR's Highlights shape (V9, Highlights −100, error against Lightroom's export. Bright tones and whites in CIE L*, response in stops. Lower is better.
Limits. This is not a render of the branch. The dumps come from a build before #3462, whose base differs from V8's by 0.01 stop on average. Your grey-patch table measures something else (patches through a camera curve, against #523's Canon medians), so the two sets of numbers don't compare directly. Glad to run other shapes or amounts through the same measurement. |
|
Thanks for running it. I missed #4100 when I searched, and it already covers Highlights with a frame-relative rule that does better on the mean and on whites. The one thing this PR adds is the reach into the upper midtones ( |
|
Closing in favour of #4100. |
Addresses #1371 for Highlights, the one Light slider with no open PR. Blacks was calibrated in V4 (#1383), Shadows is in #3923 and Whites in #4076. Part of #523.
Why
At −100, Highlights left everything below the midtones alone and darkened the bright tones by about half as much as Lightroom Classic. This is the "sliders barely do anything" in #1371. The table shows the L* shift per 10-L* band on grey patches through Sony's measured camera curve (
assets/camera-tone/sony-dro-off.json), against the Lightroom −100 medians posted in #523 (three Canon scenes):What changes (process V9; V1–V8 render as before)
finish::highlight_shape. It goes from1.7 · smooth(−1.0, 2.8, t)EV at ±100 to1.8 · smooth(−2.3, 3.0, t), wheretis the base's log2 luminance over grey. The shape is the one LR-BEHAV-RENDER-FIDELITY: process V3 Highlights, Shadows, Whites and Blacks (#523) #2313 fitted; all credit for it and the probe goes there. On today's tone curve (after V4's Contrast/Blacks and V5's roll-off) it still lands closest. A grid search over the three numbers only reached 0.97 RMS, and only with a stronger amplitude (2.2 EV) that the +100 side has no reference for, so I kept LR-BEHAV-RENDER-FIDELITY: process V3 Highlights, Shadows, Whites and Blacks (#523) #2313's.FinishParams, the GPU from newHL_LO/HL_HI/HL_AMPfields in its parameter block, so V1–V8 keep their numbers exactly.Process number
V9 is the next number on main, but #4076, #4081 and #4099 also claim V9. Whichever lands later renumbers. The change is one enum variant, the match arms and the docs row.
Tests
tests_highlights(pipeline):v9_highlights_follow_lightrooms_response: V9 at −100 is within 1.5 L* RMS of Lightroom's bands, and V8 stays 4 L* or more off (frozen).v9_highlights_move_the_upper_tones_both_ways_and_not_the_shadows: at ±100, L* 0–30 doesn't move, L* 50–90 moves the slider's way, and L* 50–80 moves at least 1.7× as far as V8.v9_renders_like_v8_without_highlights: byte-identical renders for edits without Highlights.highlights_probe(ignored) prints the table above.gpuhighlights_shadows_base_matches_on_every_processnow covers V9 (global and mask Highlights, and V8/V9 alternating through a warm cache). It ran on Metal (Apple GPU) and passes.cargo test -p lightcraft-develop -p lightcraft-pipeline -p lightcraft-gpupasses, plus the engine's process tests. One exception istests_light::v1_and_v2_render_as_before_v3, which fails on main too on macOS arm64.cargo fmt --check,cargo clippy -D warnings(develop, pipeline, gpu),cargo xtask parityandcargo xtask wasmpass.Docs:
process-versions.md(V9 row and revision history), the LR-EDIT-LIGHT-HIGHLIGHTS parity row, and What's New.Limits
tools/render_fidelity.py(LR-BEHAV-RENDER-FIDELITY: tools/render_fidelity.py measures single-slider responses against your own Lightroom exports #1181) on this branch.Written with AI assistance (Claude), reviewed and tested by me.
Summary by CodeRabbit