Use the lea instruction to reduce number of "inc"s
[ipdf/code.git] / src / shaders / circle_filled_geom.glsl
1 #version 150
2
3 layout(lines) in;
4 layout(triangle_strip, max_vertices = 4) out;
5 out vec2 objcoords;
6
7 void main()
8 {
9         gl_Position = gl_in[0].gl_Position;
10         objcoords = vec2(-1.0, -1.0);
11         EmitVertex();
12         gl_Position = vec4(gl_in[0].gl_Position.x, gl_in[1].gl_Position.y, 0.0, 1.0);
13         objcoords = vec2(-1.0, 1.0);
14         EmitVertex();
15         gl_Position = vec4(gl_in[1].gl_Position.x, gl_in[0].gl_Position.y, 0.0, 1.0);
16         objcoords = vec2(1.0, -1.0);
17         EmitVertex();
18         gl_Position = gl_in[1].gl_Position;
19         objcoords = vec2(1.0, 1.0);
20         EmitVertex();
21         EndPrimitive();
22 }

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