Fixed invalid uniforms in shaders

This commit is contained in:
antopilo
2024-09-15 16:30:06 -04:00
parent 24a4281a3d
commit c2e50822f1
10 changed files with 76 additions and 83 deletions

View File

@@ -60,10 +60,8 @@ struct DirectionalLight
{
vec3 Direction;
vec3 Color;
int ShadowMapsIDs[4];
float CascadeDepth[4];
mat4 LightTransforms[4];
int Volumetric;
int Shadow;
};

View File

@@ -10,6 +10,7 @@ layout(location = 5) in ivec4 BoneIDs;
layout(location = 6) in vec4 Weights;
uniform mat4 u_LightTransform;
uniform mat4 u_Model;
const int MAX_BONES = 200;
const int MAX_BONES_INFLUENCE = 4;
@@ -36,7 +37,7 @@ void main()
// vec3 localNormal = mat3(u_FinalBonesMatrice[BoneIDs[i]]) * Normal;
}
gl_Position = u_LightTransform * totalPosition;
gl_Position = u_LightTransform * u_Model * totalPosition;
}
#shader fragment