1#version 450
2#extension GL_EXT_nonuniform_qualifier : require
3
4layout(location = 0) flat in int Index;
5layout(location = 0) out vec4 FragColor;
6
7layout(set = 0, binding = 0) uniform UBO
8{
9 vec4 v;
10} ubos[];
11
12void main()
13{
14 FragColor = ubos[nonuniformEXT(Index)].v;
15}
16