SPIRV-Cross/shaders-hlsl/frag/spec-constant-block-size.frag
Hans-Kristian Arntzen dd603eab58 Support spec constant array size in blocks.
Won't really be correct if the spec constant is changed outside
SPIRV-Cross, but nothing we can do about that, really.
2018-02-23 15:11:45 +01:00

18 lines
287 B
GLSL

#version 310 es
precision mediump float;
layout(constant_id = 10) const int Value = 2;
layout(binding = 0) uniform SpecConstArray
{
vec4 samples[Value];
};
layout(location = 0) flat in int Index;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = samples[Index];
}