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

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