Open acgaudette opened 6 years ago
Seems like a typical offset/padding issue.
I did some digging. It turns out this is due to the Light
struct in the base frag shader.
struct Light {
vec3 vector;
float radius;
vec3 color;
float intensity;
};
Because there is an array of this struct in the UBO, Vulkan complains about padding--namely, that the vec3
should have a vec4
's worth of padding. You can "fix" it by using two vec4
s instead of the current struct. It's not possible to manually specify offsets because it's a struct outside of a UBO declaration.
Check the disassembly for more details on this. Might be because you're passing a
vec2
after avec3
.