Repository navigation
LR-EDIT-DETAIL-SHARPEN: Radius and Detail work, sharpening at pixel scale (port of upstream #762) - #72
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_radiusanddetail.sharpen_detailwere 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:
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, whichdocs/process-versions.mddoesn't allow.Planes::for_other_nr; caught by the existing stage-cache tests).>= V3so 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