Skip to content

feat: Sharpening Mask#705

Open
d1anarene wants to merge 9 commits intoCyberTimon:mainfrom
d1anarene:feature/sharpen-edges
Open

feat: Sharpening Mask#705
d1anarene wants to merge 9 commits intoCyberTimon:mainfrom
d1anarene:feature/sharpen-edges

Conversation

@d1anarene
Copy link
Contributor

@d1anarene d1anarene commented Feb 18, 2026

Lightroom Style sharpening mask slider
Applied area can be seen when dragging while pressing "Alt"

Requested in #690

@CyberTimon
Copy link
Owner

Thanks for the PR. Every image now has a strange noisy overlay which I wasn't able to remove using sliders:

image

Do you have an idea what's going wrong? Is this PR really working for you?

Thanks!

@d1anarene
Copy link
Contributor Author

Will check again soon but yes it worked fine for me

@CyberTimon
Copy link
Owner

CyberTimon commented Feb 18, 2026

Amazing - works pretty awesome! What do you think about showing the masking while dragging the slider and not just when holding down ALT? I'm unsure how many people will realize they have to press ALT.

What I noticed is that the threshold and the functionality in general is pretty inconsistent across RAW resolutions, preview resolutions and jpeg itself. Do you have a fix for this in mind?

Thanks a lot for your work!! :)

@d1anarene
Copy link
Contributor Author

d1anarene commented Feb 18, 2026

Yeah you are right. I just thought I'll keep it consistent from LR, but I solely use that slider there while pressing alt.

I could try to normalize the sharpening threshold by image resolution so the mask stays consistent whether you’re looking at a low-res preview or full-res file.

@CyberTimon
Copy link
Owner

Hi @d1anarene

Thanks again for the update.

The UX improvement with always showing the mask while dragging works good.

But I’m still noticing that the actual sharpening being applied doesn’t fully match what I’m seeing in the black/white mask preview. The mask preview looks correct, but the final sharpened result seems to affect different areas.

I think this might be related to how the threshold behaves across different resolutions. If the Canny/edge detection for the preview mask is being calculated on a downscaled preview image, that could explain the mismatch when the sharpening is later applied to the full-resolution RAW. Differences in scaling, interpolation, or gradient strength between resolutions might be shifting the effective threshold.

Maybe we need to either:

  • Normalize the threshold more strictly across resolutions (check how it's down with the blur shader itself) , or
  • Ensure the mask is generated from the same resolution that sharpening is ultimately applied to (or adjust the preview edge detection to better reflect the high res result (keep performance in mind)).

Could you take another look at how the preview mask and the final sharpening mask are derived relative to image resolution?

Thanks a lot and have a great evening,
Timon

@GimleLarpes
Copy link
Contributor

Is this ready for another review?

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.

3 participants