qt: use signed distance field to draw the video progress bar
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.