Shadows working but look dumb. The issue so far was that framebuffer.cpp interferes with the framebuffer used to create the shadow map.

This commit is contained in:
Zed A. Shaw 2026-09-19 15:09:46 -04:00
parent a29494325b
commit 482ec07fb3
19 changed files with 261 additions and 206 deletions

View file

@ -6,16 +6,18 @@ layout (location = 2) in vec2 aTexCoords;
out vec3 FragPos;
out vec3 Normal;
out vec2 TexCoords;
out vec4 FragPosLightSpace;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;
uniform mat4 lightSpaceMatrix;
void main()
{
vec4 pos = vec4(aPos, 1.0);
gl_Position = projection * view * model * pos;
FragPos = vec3(model * pos);
Normal = transpose(inverse(mat3(model))) * aNormal;
TexCoords = aTexCoords;
FragPos = vec3(model * vec4(aPos, 1.0));
Normal = transpose(inverse(mat3(model))) * aNormal;
TexCoords = aTexCoords;
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
gl_Position = projection * view * model * vec4(aPos, 1.0);
}