aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple/resources/textureshader.frag
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple/resources/textureshader.frag')
-rw-r--r--examples/simple/resources/textureshader.frag16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/simple/resources/textureshader.frag b/examples/simple/resources/textureshader.frag
new file mode 100644
index 00000000..ae12f4b0
--- /dev/null
+++ b/examples/simple/resources/textureshader.frag
@@ -0,0 +1,16 @@
+#version 330
+
+in vec2 fragment_position;
+in vec4 fragment_colour;
+in vec2 fragment_uv;
+
+out vec4 colour;
+
+uniform sampler2D texture_sampler;
+
+void main()
+{
+ vec4 texture_colour = texture(texture_sampler, fragment_uv);
+
+ colour = texture_colour * fragment_colour;
+}