SPIRV-Cross/shaders-msl/frag/huge-argument-buffer.device-argument-buffer.argument.msl2.frag
Hans-Kristian Arntzen 4bb673a626 MSL: Add opt-in support for huge IABs.
If there are enough members in an IAB, we cannot use the constant
address space as MSL compiler complains about there being too many
members. Support emitting the device address space instead.
2019-10-14 16:20:34 +02:00

27 lines
468 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
layout(location = 0) in vec2 vUV;
layout(set = 0, binding = 0) uniform sampler2D uSamplers[10000];
layout(set = 2, binding = 0) uniform sampler2D uSampler;
layout(set = 1, binding = 0) uniform UBO
{
vec4 v;
} vs[10000];
vec4 samp_array()
{
return texture(uSamplers[9999], vUV) + vs[5000].v;
}
vec4 samp_single()
{
return texture(uSampler, vUV);
}
void main()
{
FragColor = samp_array() + samp_single();
}