mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-13 21:50:06 +00:00
b57af2f5ad
This is conservative and still also decorates the loaded value.
16 lines
282 B
GLSL
16 lines
282 B
GLSL
#version 450
|
|
#extension GL_EXT_nonuniform_qualifier : require
|
|
|
|
layout(location = 0) flat in int Index;
|
|
layout(location = 0) out vec4 FragColor;
|
|
|
|
layout(set = 0, binding = 0) uniform UBO
|
|
{
|
|
vec4 v;
|
|
} ubos[];
|
|
|
|
void main()
|
|
{
|
|
FragColor = ubos[nonuniformEXT(Index)].v;
|
|
}
|