Skip to content
Snippets Groups Projects

qt: use signed distance field to draw the video progress bar

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

It was not my intention to use SDF here, as using rectangle is simpler. However, even with the new Qt 6.7 feature where adjusting radius per corner is possible, it has certain limitation such as requiring the width/height to be minimum radius * 2.0.

I realized that Inigo Quilez's sdRoundedBox(), where we already use it for rounded images, does not have this requirement. When radius is set to a large number, it simply does not paint anything (in the upper half). Instead of clipping the upper half, this makes more sense as the progress bars (that share the uniform constants) can be rendered in the same batch this way.

We could use Shape with the new curve renderer, but I opted in to use SDF instead as we already have access to sdRoundedBox().

This is an alternative to !6860 (merged)'s initial form (!6860 (comment 473901)).

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