summaryrefslogtreecommitdiff
path: root/vertex.glsl
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-03-22 12:46:23 -0500
committersanine-a <sanine.not@pm.me>2023-03-22 12:46:23 -0500
commit92803015adf19848c3f3a30caea889006ad05999 (patch)
treed3a3a325664ebb3f2b8c214217dce31746a1ae9a /vertex.glsl
parent16bcc6daab84373cac0f4125c1580d3cb1261baf (diff)
tidy up main.lua
Diffstat (limited to 'vertex.glsl')
-rw-r--r--vertex.glsl21
1 files changed, 21 insertions, 0 deletions
diff --git a/vertex.glsl b/vertex.glsl
new file mode 100644
index 0000000..1e9fb67
--- /dev/null
+++ b/vertex.glsl
@@ -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;
+}