feat: shadow integration

This commit is contained in:
2025-10-11 20:15:31 +02:00
parent f56e524d05
commit bedd6c3ca0
12 changed files with 399 additions and 112 deletions

View File

@ -9,11 +9,13 @@ layout (location = 2) in vec2 texCoord; // Vertex texture uv
out vec3 vertexPos;
out vec3 vertexNormal;
out vec2 TexCoords;
out vec4 fragPosLightSpace;
// Uniforms for transformation matrices
uniform mat4 u_model; // Model matrix: transforms from local space to world space
uniform mat4 u_view; // View matrix: transforms from world space to camera space (view space)
uniform mat4 u_projection; // Projection matrix: transforms from camera space to clip space
uniform mat4 u_lightSpace;
void main()
{
@ -25,5 +27,7 @@ void main()
TexCoords = texCoord;
fragPosLightSpace = u_lightSpace * vec4(vertexPos, 1.0);
gl_Position = u_projection * u_view * vec4(vertexPos, 1.0);
}