diff options
Diffstat (limited to 'resources/simpl.vert')
| -rw-r--r-- | resources/simpl.vert | 22 |
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; +} |
