|
This implements the Loop/Blinn algorithm for quadratic curves
as an optional backend for Qt Quick Shapes, basically distance
fields where the distance to curves are calculated in the
fragment shader.
This means cubic curves are approximated, which will give
varying results, but for many shapes (such as text) this is
efficient and means the shapes can be zoomed indefinitely
while still retaining curvature as well as anti-aliasing
working without MSAA.
Preliminary results give some frame rate improvements
compared to doing MSAA and GeometryRenderer, but the major
improvement is that you can get smooth curves at any zoom
level without re-triangulating the shape.
Note that the renderer currently does not do antialiasing
for straight lines. This would still require MSAA, but at
a lower cost than for GeometryRenderer since there are
much fewer triangles. Adding AA here as well is work in
progress.
Task-number: QTBUG-104122
Done-with: Paul Olav Tvete <[email protected]>
Done-with: Eirik Aavitsland <[email protected]>
Done-with: Amr Elsayed <[email protected]>
Change-Id: I6b4a1103546fbdfe760906f7a183101f8eedb9d3
Reviewed-by: Eirik Aavitsland <[email protected]>
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
|