aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/textmask_core.vert
blob: b0efc1e731fa4a744784c8089004b6d44f556756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 150 core

in vec4 vCoord;
in vec2 tCoord;

out vec2 sampleCoord;

uniform mat4 matrix;
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);
}