aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/textmask_core.vert
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-10 22:42:29 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-10 22:42:29 +0200
commitf5701f0def37fcc0c2b38ae9552eb3a896a34687 (patch)
treeaa9a7ebb39bedb6794f199d94525f5ddfb696308 /src/quick/scenegraph/shaders/textmask_core.vert
parentda0aac1057552048f59075beb31861a6cc076684 (diff)
parente24effdceb3a504182ae271200408750991aa94a (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Diffstat (limited to 'src/quick/scenegraph/shaders/textmask_core.vert')
-rw-r--r--src/quick/scenegraph/shaders/textmask_core.vert7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/shaders/textmask_core.vert b/src/quick/scenegraph/shaders/textmask_core.vert
index b0efc1e731..1f88974aed 100644
--- a/src/quick/scenegraph/shaders/textmask_core.vert
+++ b/src/quick/scenegraph/shaders/textmask_core.vert
@@ -5,13 +5,14 @@ in vec2 tCoord;
out vec2 sampleCoord;
-uniform mat4 matrix;
+uniform mat4 modelViewMatrix;
+uniform mat4 projectionMatrix;
uniform vec2 textureScale;
uniform float dpr;
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);
}