Skip to content

Commit a5b672a

Browse files
committed
Fix Vulkan compute shader
1 parent 3d8b25e commit a5b672a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Renderer/Shaders/lights.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ BUFFER_RO(b_pointLights, vec4, SAMPLER_LIGHTS_POINTLIGHTS);
1717
struct PointLight
1818
{
1919
vec3 position;
20+
// this padding is necessary for Vulkan when using the struct in a shared workgroup array
21+
// otherwise memory reads/writes are corrupted
22+
// I can't find where this is required per the spec so I'll assume this is a bug with Nvidia drivers/HW
23+
float _padding;
2024
vec3 intensity;
2125
float radius;
2226
};

0 commit comments

Comments
 (0)