aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/styledtext.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders/styledtext.vert')
-rw-r--r--src/quick/scenegraph/shaders/styledtext.vert3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/shaders/styledtext.vert b/src/quick/scenegraph/shaders/styledtext.vert
index 14fefc2564..7001bbc262 100644
--- a/src/quick/scenegraph/shaders/styledtext.vert
+++ b/src/quick/scenegraph/shaders/styledtext.vert
@@ -1,6 +1,7 @@
uniform highp mat4 matrix;
uniform highp vec2 textureScale;
uniform highp vec2 shift;
+uniform highp float dpr;
attribute highp vec4 vCoord;
attribute highp vec2 tCoord;
@@ -12,5 +13,5 @@ void main()
{
sampleCoord = tCoord * textureScale;
shiftedSampleCoord = (tCoord - shift) * textureScale;
- gl_Position = matrix * floor(vCoord + 0.5);
+ gl_Position = matrix * floor(vCoord * dpr + 0.5) / dpr;
}