Shadow buffer
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user