Shadow buffer

This commit is contained in:
Confideo-IOM
2026-07-28 19:02:45 +01:00
parent d48097c645
commit 299ad1d9c7
46 changed files with 693 additions and 603 deletions
@@ -8,14 +8,12 @@ struct ShadowMapSet
uint entity_id;
uint cascade_count;
uint shadow_texture_id;
uint padding0;
uint frame_buffer_id;
float near_plane[8];
float far_plane[8];
mat4 light_space_proj[6];
mat4 light_space_view[6];
};
//Push constants updated for each light
layout(binding = 0) uniform shadow_per_frame
@@ -24,8 +22,7 @@ layout(binding = 0) uniform shadow_per_frame
uint shadow_idxs;
};
layout(std430, binding = 0) readonly buffer ShadowMapSets
layout(std430, binding = 5) readonly buffer ShadowMapSets
{
ShadowMapSet shadows[10];
};
@@ -34,7 +31,6 @@ void main()
{
for (int i = 0; i < 3; ++i)
{
gl_Position = shadows[shadow_idxs].light_space_proj[gl_InvocationID] *
shadows[shadow_idxs].light_space_view[gl_InvocationID] *
gl_in[i].gl_Position;