Change Rational<Arbint> -> Rational<Gmpint>
[ipdf/code.git] / src / shaders / basictex_vert.glsl
1 #version 140
2 #extension GL_ARB_shading_language_420pack : require
3 #extension GL_ARB_explicit_attrib_location : require
4
5 layout(std140, binding=0) uniform Viewport
6 {
7         float width;
8         float height;
9 };
10
11 layout(location = 0) in vec2 position;
12 layout(location = 1) in vec2 tex_coord;
13
14 out vec2 fp_tex_coord;
15
16 void main()
17 {
18         // Transform to clip coordinates (-1,1, -1,1).
19         gl_Position.x = (position.x*2/width) - 1;
20         gl_Position.y = 1 - (position.y*2/height);
21         gl_Position.z = 0.0;
22         gl_Position.w = 1.0;
23         fp_tex_coord = tex_coord;
24 }
25

UCC git Repository :: git.ucc.asn.au