Render: Add and implement shader storage buffer (SSBO)

This commit is contained in:
Riyyi
2024-08-24 20:14:06 +02:00
parent b6e68eccec
commit b9043dbb4b
12 changed files with 374 additions and 52 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ struct DirectionalLight {
vec3 specular;
};
const int MAX_DIRECTIONAL_LIGHTS = 32;
layout(std140, binding = 1) uniform DirectionalLights {
const int MAX_DIRECTIONAL_LIGHTS = 4;
layout(std430, binding = 0) buffer DirectionalLights {
DirectionalLight u_directionalLight[MAX_DIRECTIONAL_LIGHTS];
};