summary refs log tree commit diff
path: root/res
diff options
context:
space:
mode:
authoriurii plugatarov <[email protected]>2024-08-16 20:51:24 +0200
committeriurii plugatarov <[email protected]>2024-08-16 20:51:24 +0200
commitfc3e2bed46c42a9af6a9e562b6609608e09e9850 (patch)
tree2a33d53214c71898014a8b6d135870aa82b494d3 /res
parent586369b63cdede5fa09f5f9ed73abde6c8264425 (diff)
downloadfunhalla-fc3e2bed46c42a9af6a9e562b6609608e09e9850.tar.gz
shaders and textures
Diffstat (limited to 'res')
-rw-r--r--res/images/awesomeface.pngbin0 -> 59277 bytes
-rw-r--r--res/images/container.jpgbin0 -> 184939 bytes
-rw-r--r--res/shaders/triangle.fs14
-rw-r--r--res/shaders/triangle.vs14
4 files changed, 28 insertions, 0 deletions
diff --git a/res/images/awesomeface.png b/res/images/awesomeface.png
new file mode 100644
index 0000000..9840caf
--- /dev/null
+++ b/res/images/awesomeface.png
Binary files differdiff --git a/res/images/container.jpg b/res/images/container.jpg
new file mode 100644
index 0000000..d07bee4
--- /dev/null
+++ b/res/images/container.jpg
Binary files differdiff --git a/res/shaders/triangle.fs b/res/shaders/triangle.fs
new file mode 100644
index 0000000..70a5f6d
--- /dev/null
+++ b/res/shaders/triangle.fs
@@ -0,0 +1,14 @@
+#version 330 core
+
+out vec4 FragColor;  
+
+in vec3 our_color;
+in vec2 TexCoord;
+
+uniform sampler2D texture1;
+uniform sampler2D texture2;
+
+void main()
+{
+    FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), 0.2);
+}
diff --git a/res/shaders/triangle.vs b/res/shaders/triangle.vs
new file mode 100644
index 0000000..57cbc74
--- /dev/null
+++ b/res/shaders/triangle.vs
@@ -0,0 +1,14 @@
+#version 330 core
+layout (location = 0) in vec3 a_pos;
+layout (location = 1) in vec3 a_color;
+layout (location = 2) in vec2 a_tex_coord;
+  
+out vec3 our_color;
+out vec2 TexCoord;
+
+void main()
+{
+    gl_Position = vec4(a_pos, 1.0);
+    our_color = a_color;
+    TexCoord = vec2(a_tex_coord.x, a_tex_coord.y);
+}