aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/textmask.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders/textmask.vert')
-rw-r--r--src/quick/scenegraph/shaders/textmask.vert7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/shaders/textmask.vert b/src/quick/scenegraph/shaders/textmask.vert
index 1692159d2c..7f418b0895 100644
--- a/src/quick/scenegraph/shaders/textmask.vert
+++ b/src/quick/scenegraph/shaders/textmask.vert
@@ -1,4 +1,5 @@
-uniform highp mat4 matrix;
+uniform highp mat4 modelViewMatrix;
+uniform highp mat4 projectionMatrix;
uniform highp vec2 textureScale;
uniform highp float dpr;
@@ -10,6 +11,6 @@ varying highp vec2 sampleCoord;
void main()
{
sampleCoord = tCoord * textureScale;
- vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr;
- gl_Position = matrix * vec4(dprSnapPos, vCoord.w);
+ vec4 xformed = modelViewMatrix * vCoord;
+ gl_Position = projectionMatrix * vec4(floor(xformed.xyz * dpr + 0.5) / dpr, xformed.w);
}