ADD: CSM with base shadow map

This commit is contained in:
2025-10-21 21:24:35 +09:00
parent 3b7f0869a2
commit fde6a18f80
6 changed files with 154 additions and 47 deletions

View File

@@ -3,10 +3,16 @@ layout(set = 0, binding = 0) uniform SceneData{
mat4 view;
mat4 proj;
mat4 viewproj;
// Legacy single shadow matrix (used for near range in mixed mode)
mat4 lightViewProj;
vec4 ambientColor;
vec4 sunlightDirection; //w for sun power
vec4 sunlightColor;
// Cascaded shadow matrices (0 = near/simple map, 1..N-1 = CSM)
mat4 lightViewProjCascades[4];
// View-space split distances for selecting cascades (x,y,z,w)
vec4 cascadeSplitsView;
} sceneData;
layout(set = 1, binding = 0) uniform GLTFMaterialData{