GLSL Shaders -> Files (instead of #define)
[ipdf/code.git] / src / shaders / circle_filled_geom.glsl
diff --git a/src/shaders/circle_filled_geom.glsl b/src/shaders/circle_filled_geom.glsl
new file mode 100644 (file)
index 0000000..c9f54da
--- /dev/null
@@ -0,0 +1,22 @@
+#version 150
+
+layout(lines) in;
+layout(triangle_strip, max_vertices = 4) out;
+out vec2 objcoords;
+
+void main()
+{
+       gl_Position = gl_in[0].gl_Position;
+       objcoords = vec2(-1.0, -1.0);
+       EmitVertex();
+       gl_Position = vec4(gl_in[0].gl_Position.x, gl_in[1].gl_Position.y, 0.0, 1.0);
+       objcoords = vec2(-1.0, 1.0);
+       EmitVertex();
+       gl_Position = vec4(gl_in[1].gl_Position.x, gl_in[0].gl_Position.y, 0.0, 1.0);
+       objcoords = vec2(1.0, -1.0);
+       EmitVertex();
+       gl_Position = gl_in[1].gl_Position;
+       objcoords = vec2(1.0, 1.0);
+       EmitVertex();
+       EndPrimitive();
+}

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