diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:29 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:29 +0200 |
commit | f5701f0def37fcc0c2b38ae9552eb3a896a34687 (patch) | |
tree | aa9a7ebb39bedb6794f199d94525f5ddfb696308 /src/quick/scenegraph/shaders/styledtext_core.vert | |
parent | da0aac1057552048f59075beb31861a6cc076684 (diff) | |
parent | e24effdceb3a504182ae271200408750991aa94a (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: I2e0f34eea87c1393dff82f153650eccf5048248f
Diffstat (limited to 'src/quick/scenegraph/shaders/styledtext_core.vert')
-rw-r--r-- | src/quick/scenegraph/shaders/styledtext_core.vert | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/shaders/styledtext_core.vert b/src/quick/scenegraph/shaders/styledtext_core.vert index 04a0e88da8..d9a81bf06f 100644 --- a/src/quick/scenegraph/shaders/styledtext_core.vert +++ b/src/quick/scenegraph/shaders/styledtext_core.vert @@ -6,7 +6,8 @@ in vec2 tCoord; out vec2 sampleCoord; out vec2 shiftedSampleCoord; -uniform mat4 matrix; +uniform mat4 modelViewMatrix; +uniform mat4 projectionMatrix; uniform vec2 textureScale; uniform vec2 shift; uniform float dpr; @@ -15,6 +16,6 @@ void main() { sampleCoord = tCoord * textureScale; shiftedSampleCoord = (tCoord - shift) * 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); } |