summaryrefslogtreecommitdiff
path: root/resources/simpl.vert
diff options
context:
space:
mode:
author0undefined <oscar@nelin.dk>2026-03-11 06:51:35 +0000
committer0undefined <oscar@nelin.dk>2026-03-11 06:52:40 +0000
commitf1e3ffff689a53569405064f52e7c537e6d31031 (patch)
treecea91134d90a3623fd85f7ddb91d87c61c133eae /resources/simpl.vert
parenta0e862d97f78d581e5ee1ee84289236e805e8c0f (diff)
Draw suzanne and icosphere
Diffstat (limited to 'resources/simpl.vert')
-rw-r--r--resources/simpl.vert22
1 files changed, 22 insertions, 0 deletions
diff --git a/resources/simpl.vert b/resources/simpl.vert
new file mode 100644
index 0000000..a4f06cc
--- /dev/null
+++ b/resources/simpl.vert
@@ -0,0 +1,22 @@
+#version 330 core
+
+// Input vertex data, different for all executions of this shader.
+layout(location = 0) in vec3 vertexPosition_modelspace;
+//layout(location = 1) in vec2 vertexUV;
+layout(location = 2) in vec3 vNorm;
+
+//out vec2 UV;
+out vec3 FragmentPos;
+out vec3 Normal;
+
+uniform mat4 MVP;
+uniform mat4 modelPosition;
+
+void main() {
+
+ gl_Position = MVP * vec4(vertexPosition_modelspace, 1);
+
+ //UV = vertexUV;
+ FragmentPos = vec3(modelPosition[3][0], modelPosition[3][1], modelPosition[3][2]);//vec3(modelPosition * vec4(vertexPosition_modelspace,1));
+ Normal = vNorm;
+}