-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.10, 6.10.0 Beta3
-
None
-
-
c1e0c1a5c (dev)
The curve renderer has logic to detect the current scale in order to get the antialiasing right. However, when layer is enabled, this will always be 1, even if the scene has a scale. This causes very blurry results.
Example:
import QtQuick import QtQuick.VectorImage import QtQuick.VectorImage.Helpers import QtQuick.Shapes Window { id: win width: 640 height: 480 visible: true title: qsTr("Hello World") Item { anchors.centerIn: parent implicitWidth: 100 implicitHeight: 100 scale: 10 id: _qt_node0 Item { objectName: "myMask" id: _qt_node1 visible: true implicitWidth: 100 implicitHeight: 100 layer.enabled: true layer.textureSize: Qt.size(1000, 1000) Shape { id: _qt_node2 implicitWidth: 100 implicitHeight: 100 preferredRendererType: Shape.CurveRenderer ShapePath { id: _qt_shapePath_0 strokeColor: "transparent" fillColor: "#ffffffff" fillRule: ShapePath.WindingFill PathSvg { path: "M 0 0 L 100 0 L 100 100 L 0 100 L 0 0 " } } } Shape { id: _qt_node3 implicitWidth: 80 implicitHeight: 80 preferredRendererType: Shape.CurveRenderer ShapePath { id: _qt_shapePath_1 strokeColor: "transparent" fillColor: "#ff000000" fillRule: ShapePath.WindingFill PathSvg { path: "M 10 35 C 10 23.9543 18.9543 15 30 15 C 41.0457 15 50 23.9543 50 35 C 50 23.9543 58.9543 15 70 15 C 81.0457 15 90 23.9543 90 35 C 90 55 76.6667 75 50 95 C 23.3333 75 10 55 10 35 " } } } } } }
Either we have to somehow detect the real scale factor; not sure why it's wrong, since the shape is scaled correctly and drawn at the correct size, so we must be passing in the right matrix somewhere..
Alternatively, we could perhaps detect when we are rendering to a layer and enable the fragment shader gradients in that case, like we do for 3D (granted that it's available). This would at least fix the issue for a majority of targets at the expense of some extra GPU time when rendering the layer.
- is required for
-
QTBUG-121537 Implement support for "mask" in SVG generators
-
- In Progress
-
- relates to
-
QTBUG-45281 Text rendered through a ShaderEffectSource gets wrong rendering
-
- Reported
-
For Gerrit Dashboard: QTBUG-139997 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
674409,6 | Calculate correct device pixel ratio when rendering to layer | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |