Move light around the scene

This commit is contained in:
2024-12-03 20:08:40 +00:00
parent d8ab418180
commit 9cbfa55c89
3 changed files with 94 additions and 46 deletions

View File

@@ -1,11 +1,18 @@
#version 330 core
layout(location=0) in vec3 position;
layout(location=1) in vec3 normal;
out vec3 vert_normal;
out vec3 frag_position;
uniform mat3 normal_mat;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main() {
gl_Position = projection * view * model * vec4(position, 1.0);
vert_normal = normal_mat * normal;
frag_position = vec3(model * vec4(position, 1.0));
gl_Position = projection * view * model * vec4(position, 1.0);
};