Skip to content

Conversation

@cedricp
Copy link
Contributor

@cedricp cedricp commented May 26, 2025

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
    • I have updated the documentation accordingly

What does this pull request do?

Add a dithering filter to avoid color banding

Show a few screenshots (if this is a visual change)

[Your answer, delete this section if it is not a visual change.]

Have you tested your changes (if applicable)? If so, how?

Yes

Futher details of this pull request

Only works when the viewer is set to 32 bits FP

@devernay
Copy link
Member

I'm pretty sure we already have software (Floyd Steinberg) dithering, and dithered tiles are cached in the viewer cache. Did you see that in the code?
Did you observe color banding, and can you show before/after this change?

@cedricp
Copy link
Contributor Author

cedricp commented May 26, 2025

Oh, really, I haven't found any dithering code, maybe I overlooked it... This PR removes banding, though. I'll make a with/without image ASAP

@cedricp
Copy link
Contributor Author

cedricp commented May 30, 2025

Here's a ramp without dithering filter :
image
and with :
image
I searched for a dithering algo in the code, but I couldn't find it.

@cedricp
Copy link
Contributor Author

cedricp commented May 30, 2025

BTW, is there a release planned soon ?

@cedricp
Copy link
Contributor Author

cedricp commented May 30, 2025

There's a typo in the shader code I fixed here : b992cd8

@cedricp
Copy link
Contributor Author

cedricp commented Jul 4, 2025

It seems that there's a dithering filter when working in 8 bits mode in the viewer, I didn't check that before, this patch remains valid as I can't find dithering filter in 32 bits mode

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