SPIRV-Cross/shaders-msl-no-opt/frag/ubo-offset-out-of-order.frag
Hans-Kristian Arntzen 0ebb88cc39 MSL: Redirect member indices when buffer has been sorted by Offset.
If a buffer rewrites its Offsets, all member references to that struct
are invalidated, and must be redirected, do so in to_member_reference,
but there might be other places where this is needed. Fix as required.
SPIR-V code relying on this is somewhat questionable, but seems to be
in-spec.
2020-04-30 11:48:53 +02:00

17 lines
243 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 0) uniform UBO
{
layout(offset = 16) mat4 m;
layout(offset = 0) vec4 v;
};
layout(location = 0) in vec4 vColor;
void main()
{
FragColor = m * vColor + v;
}