aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/outlinedtext_core.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders/outlinedtext_core.vert')
-rw-r--r--src/quick/scenegraph/shaders/outlinedtext_core.vert9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/scenegraph/shaders/outlinedtext_core.vert b/src/quick/scenegraph/shaders/outlinedtext_core.vert
index a854355460..50a1371e89 100644
--- a/src/quick/scenegraph/shaders/outlinedtext_core.vert
+++ b/src/quick/scenegraph/shaders/outlinedtext_core.vert
@@ -9,7 +9,8 @@ out vec2 sCoordDown;
out vec2 sCoordLeft;
out vec2 sCoordRight;
-uniform mat4 matrix;
+uniform mat4 modelViewMatrix;
+uniform mat4 projectionMatrix;
uniform vec2 textureScale;
uniform vec2 shift;
uniform float dpr;
@@ -21,6 +22,6 @@ void main()
sCoordDown = (tCoord - vec2(0.0, 1.0)) * textureScale;
sCoordLeft = (tCoord - vec2(-1.0, 0.0)) * textureScale;
sCoordRight = (tCoord - vec2(1.0, 0.0)) * textureScale;
- vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr;
- gl_Position = matrix * vec4(dprSnapPos, vCoord.w);
-} \ No newline at end of file
+ vec4 xformed = modelViewMatrix * vCoord;
+ gl_Position = projectionMatrix * vec4(floor(xformed.xyz * dpr + 0.5) / dpr, xformed.w);
+}