aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders/styledtext.vert
blob: 29c9902609006fc04b6cf20a92e686cc2b64f388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
uniform highp mat4 matrix;
uniform highp vec2 textureScale;
uniform highp vec2 shift;
uniform highp float dpr;

attribute highp vec4 vCoord;
attribute highp vec2 tCoord;

varying highp vec2 sampleCoord;
varying highp vec2 shiftedSampleCoord;

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);
}