trying to add better lighting

This commit is contained in:
JISAUAY committed 2024-09-25 17:41:43 -05:00
1 parent 2b1fa60212
commit ce888f5ac0
17 files changed
+129 -12362

No files matched your search

+11 -12
View File
@@ -1,23 +1,22 @@
#version 330 core
layout (location = 0) in vec3 aPos;
// layout (location = 1) in vec3 aNormal;
//layout (location = 1) in vec3 aColor;
layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
uniform mat4 model;
uniform mat4 model;
// uniform mat4 view;
uniform mat4 projection;
// uniform vec3 lightPos;
uniform vec3 lightPos;
// out vec3 FragPos;
// out vec3 Normal;
// out vec3 LightPos;
out vec3 FragPos;
out vec3 Normal;
out vec3 LightPos;
void main()
{
// * view * model
gl_Position = projection * model * vec4(aPos, 1.0);
// FragPos = vec3(vec4(aPos, 1.0));
// Normal = mat3(transpose(inverse(view * model))) * aNormal;
// LightPos = vec3(view * vec4(lightPos, 1.0));
gl_Position = projection * model * vec4(position, 1.0);
FragPos = vec3(model * vec4(position, 1.0));
Normal = normal;
LightPos = lightPos;
}