summaryrefslogtreecommitdiffstats
path: root/examples/gui/rhiwindow/shaders/color.frag
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui/rhiwindow/shaders/color.frag')
-rw-r--r--examples/gui/rhiwindow/shaders/color.frag15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/gui/rhiwindow/shaders/color.frag b/examples/gui/rhiwindow/shaders/color.frag
new file mode 100644
index 0000000000..6e0a3bc91f
--- /dev/null
+++ b/examples/gui/rhiwindow/shaders/color.frag
@@ -0,0 +1,15 @@
+#version 440
+
+layout(location = 0) in vec3 v_color;
+
+layout(location = 0) out vec4 fragColor;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+ float opacity;
+};
+
+void main()
+{
+ fragColor = vec4(v_color * opacity, opacity);
+}