Skip to content
Snippets Groups Projects

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

Open Fatih Uzunoğlu requested to merge fuzun/vlc:qt/sdfroundedtextureadjustments into master

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading