#version 450 const int MAX_LIGHTS = 10; layout(location = 0) in vec3 v_Normal; layout(location = 1) in vec4 v_Position; layout(location = 0) out vec4 o_Target; struct Light { mat4 proj; vec4 pos; vec4 color; }; layout(set = 0, binding = 0) uniform Globals { mat4 u_ViewProj; uvec4 u_NumLights; }; layout(set = 0, binding = 1) uniform Lights { Light u_Lights[MAX_LIGHTS]; }; layout(set = 0, binding = 2) uniform texture2DArray t_Shadow; layout(set = 0, binding = 3) uniform samplerShadow s_Shadow; layout(set = 1, binding = 0) uniform Entity { mat4 u_World; vec4 u_Color; }; void main() { vec3 normal = normalize(v_Normal); vec3 ambient = vec3(0.05, 0.05, 0.05); // accumulate color vec3 color = ambient; for (int i=0; i