Skip to content

qt: support background coloring and fix hard edge in round image

I'm not sure what is better, fwidth() may not be so cheap, so providing the soft edge as a uniform also makes sense (current approach is providing 1.0 / Math.min(width, height) as uniform).

Currently, we are not making use of custom soft edge as an effect, but rather have such a soft edge to merely act as antialiasing.

It seems that fwidth() would be more accurate to use for the anti aliasing here. It is hard for me to observe the difference, so I would be fine keeping the current approach.

In https://blog.frost.kiwi/analytical-anti-aliasing/#implementation, the difference can be seen ("Pixel size method" being fwidth (Screen-space derivative) or Precalculate pixel size).

The problem is more about having a hard edge currently, because without shrinking the outer soft edge exceeds the rectangle boundaries. This is also explained in https://blog.frost.kiwi/analytical-anti-aliasing/#unmentioned-challenges.

Request review @chub.

Edited by Fatih Uzunoğlu

Merge request reports

Loading