From f1e3ffff689a53569405064f52e7c537e6d31031 Mon Sep 17 00:00:00 2001 From: 0undefined Date: Wed, 11 Mar 2026 07:51:35 +0100 Subject: Draw suzanne and icosphere --- resources/simpl.vert | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 resources/simpl.vert (limited to 'resources/simpl.vert') 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; +} -- cgit v1.3