summaryrefslogtreecommitdiff
path: root/source/shaders/ui_text.vs.glsl
blob: 9bba9047fca3037e050e455dbb602ad4d8d0a8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#version 330 core
layout(location=0) in vec2 aPos;

uniform mat4 Projection;
uniform mat4 View;
uniform mat4 LetterTransforms[32];
out vec2 TexCoords;
flat out int Index;

void main() {
  gl_Position = Projection * View * LetterTransforms[gl_InstanceID] * vec4(aPos, 0.0, 1.0);
  vec2 tex = aPos;
  TexCoords = tex;
  TexCoords.y = 1.0 - TexCoords.y;
  Index = gl_InstanceID;
}