summaryrefslogtreecommitdiff
path: root/shaders/mesh.vert
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-09 10:55:50 -0500
committersanine-a <sanine.not@pm.me>2023-05-09 10:55:50 -0500
commit2a14abecaee073aef1f1966bb397d6086b2e4785 (patch)
tree5be4f00446867f536050de7903e7d4bdf85eed97 /shaders/mesh.vert
parent40c634a1650b2b666f92d1eafa3271dbe5a33b69 (diff)
refactor: rename transform -> node
Diffstat (limited to 'shaders/mesh.vert')
-rw-r--r--shaders/mesh.vert21
1 files changed, 21 insertions, 0 deletions
diff --git a/shaders/mesh.vert b/shaders/mesh.vert
new file mode 100644
index 0000000..cb20d1f
--- /dev/null
+++ b/shaders/mesh.vert
@@ -0,0 +1,21 @@
+#version 410 core
+layout (location = 0) in vec3 in_position;
+layout (location = 1) in vec3 in_normal;
+layout (location = 2) in vec2 in_tex;
+
+uniform mat4 model;
+uniform mat4 view;
+uniform mat4 projection;
+
+out vec3 position;
+out vec3 normal;
+out vec2 tex;
+
+void main()
+{
+ gl_Position = projection * view * model * vec4(in_position, 1.0);
+ position = in_position;
+ //normal = vec3(model * vec4(in_normal, 1.0f));
+ normal = in_normal;
+ tex = in_tex;
+}