diff options
Diffstat (limited to 'src/quick/scenegraph/shaders/textmask_core.vert')
-rw-r--r-- | src/quick/scenegraph/shaders/textmask_core.vert | 7 |
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); } |