aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickshapes/shaders_ng/wireframe.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickshapes/shaders_ng/wireframe.vert')
-rw-r--r--src/quickshapes/shaders_ng/wireframe.vert23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/quickshapes/shaders_ng/wireframe.vert b/src/quickshapes/shaders_ng/wireframe.vert
new file mode 100644
index 0000000000..69f8872d51
--- /dev/null
+++ b/src/quickshapes/shaders_ng/wireframe.vert
@@ -0,0 +1,23 @@
+#version 440
+
+layout(location = 0) in vec4 vertexCoord;
+layout(location = 1) in vec3 vertexBarycentric;
+layout(location = 0) out vec3 barycentric;
+
+layout(std140, binding = 0) uniform buf {
+#if QSHADER_VIEW_COUNT >= 2
+ mat4 qt_Matrix[QSHADER_VIEW_COUNT];
+#else
+ mat4 qt_Matrix;
+#endif
+} ubuf;
+
+void main()
+{
+ barycentric = vertexBarycentric;
+#if QSHADER_VIEW_COUNT >= 2
+ gl_Position = ubuf.qt_Matrix[gl_ViewIndex] * vertexCoord;
+#else
+ gl_Position = ubuf.qt_Matrix * vertexCoord;
+#endif
+}