aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/vertexcolor.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/vertexcolor.vert')
-rw-r--r--src/quick/scenegraph/shaders_ng/vertexcolor.vert19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/quick/scenegraph/shaders_ng/vertexcolor.vert b/src/quick/scenegraph/shaders_ng/vertexcolor.vert
new file mode 100644
index 0000000000..bfb9a95073
--- /dev/null
+++ b/src/quick/scenegraph/shaders_ng/vertexcolor.vert
@@ -0,0 +1,19 @@
+#version 440
+
+layout(location = 0) in vec4 vertexCoord;
+layout(location = 1) in vec4 vertexColor;
+
+layout(location = 0) out vec4 color;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 matrix;
+ float opacity;
+} ubuf;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+ gl_Position = ubuf.matrix * vertexCoord;
+ color = vertexColor * ubuf.opacity;
+}