SPIRV-Cross/reference/opt/shaders/flatten/multi-dimensional.desktop.invalid.flatten_dim.frag
Hans-Kristian Arntzen af75ef005f Update glslang and SPIRV-Tools.
A lot of changes in spirv-opt output.
Some new invalid SPIR-V was found but most of them were not significant
for SPIRV-Cross, so just marked them as invalid.
2018-09-27 11:10:22 +02:00

25 lines
635 B
GLSL

#version 450
layout(binding = 0) uniform sampler2D uTextures[2 * 3 * 1];
layout(location = 1) in vec2 vUV;
layout(location = 0) out vec4 FragColor;
layout(location = 0) flat in int vIndex;
void main()
{
vec4 values3[2 * 3 * 1];
for (int z = 0; z < 2; z++)
{
for (int y = 0; y < 3; y++)
{
for (int x = 0; x < 1; x++)
{
values3[z * 3 * 1 + y * 1 + x] = texture(uTextures[z * 3 * 1 + y * 1 + x], vUV);
}
}
}
FragColor = (values3[1 * 3 * 1 + 2 * 1 + 0] + values3[0 * 3 * 1 + 2 * 1 + 0]) + values3[(vIndex + 1) * 3 * 1 + 2 * 1 + vIndex];
}