Skip to content

LR-EDIT-LIGHT-HIGHLIGHTS: process V9, Highlights as strong as Lightroom's (#1371) - #4480

Closed
Bruno-Alumn wants to merge 2 commits into
storytold:mainfrom
Bruno-Alumn:fix/highlights-strength-1371
Closed

Bruno-Alumn wants to merge 2 commits into
storytold:mainfrom
Bruno-Alumn:fix/highlights-strength-1371

Conversation

@Bruno-Alumn

@Bruno-Alumn Bruno-Alumn commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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):

band L* 0–10 10–20 20–30 30–40 40–50 50–60 60–70 70–80 80–90 90–100 RMS vs Lightroom
Lightroom −100 −0.2 −0.9 −1.5 −2.1 −3.5 −5.9 −8.9 −14.0 −19.3 −15.6
V8 (main) −100 0 0 0 0 0 −0.2 −2.6 −7.2 −12.8 −12.1 4.40
V9 −100 0 0 0 −0.4 −2.3 −5.4 −10.0 −14.9 −18.7 −13.9 1.13
V8 +100 0 0 0 0 0 +0.2 +2.5 +6.4 +6.7 +3.5
V9 +100 0 0 0 +0.5 +2.5 +5.5 +9.7 +11.7 +8.4 +3.7

What changes (process V9; V1–V8 render as before)

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.
    • The first two fail with V8's shape in V9.
    • highlights_probe (ignored) prints the table above.
  • gpu highlights_shadows_base_matches_on_every_process now 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-gpu passes, plus the engine's process tests. One exception is tests_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 parity and cargo xtask wasm pass.

Docs: process-versions.md (V9 row and revision history), the LR-EDIT-LIGHT-HIGHLIGHTS parity row, and What's New.

Limits

Written with AI assistance (Claude), reviewed and tested by me.

Summary by CodeRabbit

  • New Features
    • Added process V9, which extends Highlights adjustments into the upper midtones and darkens the brightest tones more strongly.
  • Improvements
    • Photos without Highlights adjustments retain their previous appearance when using V9. V9 also supports the established grain and tone-mapping behavior.
  • Documentation
    • Updated process-version and release information to explain V9’s effect on new photos and previously edited photos, which retain their appearance until updated to the current process.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Process V9 becomes the latest process version. It uses a revised Highlights tone shape in CPU and GPU rendering, and existing grain, tone-map, camera-look, and local-detail behavior is extended to V9. Tests and documentation describe the new response.

Changes: Process V9 Highlights

Layer / File(s) Summary
Register V9 and extend process behavior
crates/develop/src/settings.rs, crates/pipeline/src/finish.rs, crates/pipeline/src/light_v3.rs, crates/pipeline/src/local.rs, crates/pipeline/src/tests_grain.rs, xtask/src/ci_quick.rs
V9 becomes the latest process and maps to version 9. V9 also uses crystal grain, enters existing tone-map and camera-look branches, and uses the existing local detail radius. Camera-tone asset changes now map to both the engine and pipeline in quick CI.
Select and apply the Highlights shape
crates/pipeline/src/finish.rs, crates/gpu/src/params.rs, crates/gpu/src/wgsl/finish.wgsl, crates/gpu/tests/it/equivalence.rs
V1–V8 retain the existing Highlights shape. V9 uses bounds (-2.3, 3.0) and amplitude 1.8. The GPU parameter block passes these values to the shader, which uses them for the Highlights adjustment.
Validate and document V9 behavior
crates/pipeline/src/tests_highlights.rs, crates/pipeline/src/lib.rs, docs/parity-checklist.md, docs/process-versions.md, docs/whats-new.md
Tests compare V8 and V9 against Lightroom’s Highlights response and verify render equivalence when Highlights is unset. The documentation describes V9’s behavior and its use for new photos and Reset.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant DevelopSettings
  participant FinishParams
  participant GPUParameterBlock
  participant FinishShader
  DevelopSettings->>FinishParams: Select process-specific Highlights shape
  FinishParams->>GPUParameterBlock: Supply bounds and amplitude
  GPUParameterBlock->>FinishShader: Pass HL_LO, HL_HI, and HL_AMP
  FinishShader->>FinishShader: Apply shape to Highlights adjustment
Loading

Possibly related issues

  • storytold/lightcraft issue 523 — The issue reports Lightroom parity differences in Light-panel values, including Highlights. This change updates the Highlights response for V9 and measures it against Lightroom.
  • storytold/lightcraft issue 2396 — The issue describes the fixed Highlights pull and proposes a new process version. V9 changes the Highlights response in a new process version, but does not add headroom-aware recovery.

Suggested reviewers: mattsivak

Merge Risk: Minimal · up to 31450

This adds a new process version with a stronger Highlights response, and older processes keep their current rendering. Tests and documentation cover the change, and no concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding process V9 that makes Highlights match Lightroom's response at -100. The changeset adds Process::V9, a V9 highlight shape, and V9 tests and docs, so the title m…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding process V9 that makes Highlights match Lightroom's response at -100. The changeset adds Process::V9, a V9 highlight shape, and V9 tests and docs, so the title matches the main change. The title uses an issue-style prefix and a trailing issue number (#1371), but it remains specific and readable. The 81-character length is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between da00e7c and 31450e1.

Files selected for processing: 1

  • xtask/src/ci_quick.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AlexChambers

Copy link
Copy Markdown
Contributor

I measured this PR's Highlights shape (V9, 1.8 · smooth(−2.3, 3.0, t)) on my own photos, with the same method as my comment on #4100 and the study behind #523. On these photos it gets about 36% of the way from no edit to Lightroom on bright tones. Today's V8 gets 16%, #4100's rule 42%.

Highlights −100, error against Lightroom's export. Bright tones and whites in CIE L*, response in stops. Lower is better.

Fresh photos (261): stops bright tones whites All photos, 13 folds (350): stops bright tones whites
no edit 1.24 18.0 24.0 1.17 17.1 23.0
main (V8) 1.11 15.2 16.9 1.04 14.4 16.0
this PR 0.90 11.6 16.0 0.83 10.7 15.1
#4100 0.85 10.5 12.7 0.84 10.4 12.7
candidate in #523 0.18 2.0 4.3 0.15 1.8 3.6

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.

@Bruno-Alumn

Copy link
Copy Markdown
Contributor Author

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 (lo −2.3 instead of −1.0), which your numbers show helps the median photo most (6.6 vs #4100's 8.1 L*). If that's useful, it could fold into #4100's weight rather than ship as a separate process. I'm happy to close this in favour of #4100.

@Bruno-Alumn

Copy link
Copy Markdown
Contributor Author

Closing in favour of #4100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants