Skip to content

LR-EDIT-DETAIL-SHARPEN: Radius and Detail work, sharpening at pixel scale (port of upstream #762) - #72

Merged
emmertex merged 2 commits into
mainfrom
fix/082-sharpen-radius
Oct 14, 2026
Merged

emmertex merged 2 commits into
mainfrom
fix/082-sharpen-radius

Conversation

@emmertex

Copy link
Copy Markdown
Owner

No fork issue. User report (Morfld, 0.8.1 macOS, Nikon Z5II NEF): Develop > Detail > Sharpening Radius (and Detail) have no effect. Upstream issue storytold/lightcraft#757; this ports radialmonster's open upstream PR storytold/lightcraft#762 (their commit and authorship are kept).

Root cause: detail.sharpen_radius and detail.sharpen_detail were never read; sharpening boosted the Texture band (σ ≈ 0.18 % of the long edge), so it acted on mid-scale texture.

Change (from #762): unsharp mask of log luminance against an exact Gaussian at Radius (source px, scaled to the render, 0.3–4 px); Detail soft-clips the term; Masking gates it; local Sharpness uses the same band; GPU gets the same taps (gauss.wgsl).

Fork additions:

  • Ships as process V4: V1–V3 photos keep the old sharpening (CPU and GPU branch on finish::sharpen_v4); new photos / Reset / Update to Current Process get V4. Issue #684 (PR 1): Advanced Search dialog with structured field filters #762 changed every existing photo's look in place, which docs/process-versions.md doesn't allow.
  • Draft renders after a noise-reduction change no longer reuse a stale sharpen plane (Planes::for_other_nr; caught by the existing stage-cache tests).
  • Dehaze V3 check is >= V3 so V4 keeps it.

Tests: #762's 9 sharpen tests + a test that V1–V3 renders ignore Radius/Detail and still sharpen; GPU equivalence incl. a V3 legacy case (max 1 LSB on a real adapter).

Perf (6000×4500 source, release, best of 5 slider steps, V3 → V4): draft 1920 px drag 15–18 ms → 17 ms; full 6000 px drag ~151 → ~150 ms; cold ~240 → ~235 ms. Within noise.

Checks: cargo xtask ci --fast (all 12 steps), cargo xtask sil, cargo test -p lcc-pipeline -p lcc-develop, -p lcc-gpu --test equivalence, engine process tests.

🤖 Generated with Claude Code

…t pixel scale (#757)

Port of upstream PR storytold/lightcraft#762 by radialmonster. Sharpening is an unsharp
mask of log luminance against an exact Gaussian at the Radius (source pixels), Detail
soft-clips the term, Masking gates it; GPU uses the same taps (gauss.wgsl).

Fork changes: ships as process V4 (docs/process-versions.md) so photos on V1-V3 keep the
old Texture-band sharpening (CPU and GPU both branch, `finish::sharpen_v4`); drafts after a
noise-reduction change drop the stale sharpen plane (`Planes::for_other_nr`); dehaze V3
check is now `>= V3`. Render cache version 63.

Sources: radialmonster's upstream PR #762 (own design there).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@emmertex
emmertex merged commit aeaa552 into main Oct 14, 2026
6 checks passed
@emmertex
emmertex deleted the fix/082-sharpen-radius branch October 14, 2026 09:33
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