summaryrefslogtreecommitdiff
path: root/mesh_loading_test/shaders
diff options
context:
space:
mode:
authorpryazha <pryadeiniv@mail.ru>2025-01-19 17:33:44 +0500
committerpryazha <pryadeiniv@mail.ru>2025-01-19 17:33:44 +0500
commitbd49bd525f4c6c6c15c4142bf42d1dd38be6fc16 (patch)
tree9e69f473c34b53e9e57d8af1873c39698bf5c80e /mesh_loading_test/shaders
initial commit
Diffstat (limited to 'mesh_loading_test/shaders')
-rw-r--r--mesh_loading_test/shaders/default.fs13
-rw-r--r--mesh_loading_test/shaders/default.vs16
2 files changed, 29 insertions, 0 deletions
diff --git a/mesh_loading_test/shaders/default.fs b/mesh_loading_test/shaders/default.fs
new file mode 100644
index 0000000..bdd4b9a
--- /dev/null
+++ b/mesh_loading_test/shaders/default.fs
@@ -0,0 +1,13 @@
+#version 330 core
+
+in vec2 tex_coords;
+
+out vec4 frag_color;
+
+uniform sampler2D texture1;
+
+void
+main(void)
+{
+ frag_color = texture(texture1, tex_coords);
+}
diff --git a/mesh_loading_test/shaders/default.vs b/mesh_loading_test/shaders/default.vs
new file mode 100644
index 0000000..90e883a
--- /dev/null
+++ b/mesh_loading_test/shaders/default.vs
@@ -0,0 +1,16 @@
+#version 330 core
+layout(location = 0) in vec3 apos;
+layout(location = 2) in vec2 atex_coords;
+
+out vec2 tex_coords;
+
+uniform mat4 projection;
+uniform mat4 view;
+uniform mat4 model;
+
+void
+main(void)
+{
+ tex_coords = atex_coords;
+ gl_Position = projection*view*model*vec4(apos, 1.0);
+}