Light locations had to be padded properly, that ended up being the ultimate fix. Leading to this bug though I ended up patching a lot of stuff that was mysteriously missing from the Vulkan backend like specialization constants and
14 lines
363 B
GLSL
14 lines
363 B
GLSL
layout (constant_id = 0) const int max_lights = 25;
|
|
|
|
layout (location = 0) in vec3 inPos;
|
|
layout (location = 1) flat in int index;
|
|
|
|
layout (location = 0) out float outFragColor;
|
|
|
|
layout(std430, binding = 2) buffer readonly LightInformation {
|
|
vec4 light_locations[max_lights];
|
|
};
|
|
|
|
void main() {
|
|
outFragColor = length(inPos - light_locations[index].xyz);
|
|
}
|