Skip to content

shaders/sampling: enable antiringing for EWA scalers

Niklas Haas requested to merge haasn/libplacebo:ewa_antiring into master

Based on a 12-tap design (dmax <= 1, which includes the 4 center texels as well as 8 texels orthogonally surrounding it). This seems to give the best results in practice and eliminates the issues with smaller kernels, though it's not perfect. Better than the status quo of "nothing". Users can always turn it off if they don't like it..

There are more possible designs we could use here:

  1. Weigh the "surrounding" texels less strongly, i.e. instead of doing hi = max(hi, c), we could do hi = mix(hi, max(hi, c), str) where str is some kernel weight that goes down with distance.

  2. In theory, we could even use the "true" weight from the actual pixel distance here.

More testing needed. Usefulness TBD.

Merge request reports

Loading