summaryrefslogtreecommitdiff
path: root/demo.fs
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-05-21 10:16:59 -0500
committersanine-a <sanine.not@pm.me>2020-05-21 10:16:59 -0500
commit8b7e8a1a3e77b4e3b56ea9025af8b254faa16c13 (patch)
tree3f39bb785d5f1df1f026589a6cc1aa2749e30e6d /demo.fs
parent9b66b322b600ab0db66cb6f3ff5a7c4196b9193f (diff)
add textured cube primitive
Diffstat (limited to 'demo.fs')
-rw-r--r--demo.fs7
1 files changed, 5 insertions, 2 deletions
diff --git a/demo.fs b/demo.fs
index e43d761..84ed0fd 100644
--- a/demo.fs
+++ b/demo.fs
@@ -1,10 +1,13 @@
#version 330 core
-in vec4 color;
+in vec2 texture_coordinate;
+
+uniform sampler2D box_texture;
+uniform sampler2D happy_texture;
out vec4 FragColor;
void main()
{
- FragColor = color;
+ FragColor = mix(texture(box_texture, texture_coordinate), texture(happy_texture, vec2(1,1)-texture_coordinate), 0.2);
}