Update to rust-rocket 0.7.2
[mandelwow.git] / shaders / text.vert
1 #version 300 es
2
3 uniform mat4 model;
4 uniform mat4 perspview;
5 uniform int index;
6
7 in vec2 position;
8 in vec2 tex_coords;
9
10 out vec2 v_tex_coords;
11 out ivec4 v_fgcolor;
12
13 void main() {
14     gl_Position = perspview * model * vec4(position, 0.0, 1.0);
15
16     // Characters are arranged in a 16x16 square.
17     int xpos = index % 16;
18     int ypos = index / 16;
19     v_tex_coords = (tex_coords + vec2(xpos, ypos)) / 16.;
20 }