RetroArch/deps/SPIRV-Cross/shaders/flatten/multi-dimensional.desktop.flatten_dim.frag
aliaspider 5af5222249 update SPIRV-Cross
- https://github.com/KhronosGroup/SPIRV-Cross/commit/
66a407285e36a0f772e3209cb86ded6e3d900f6a
2018-01-26 13:48:17 +01:00

19 lines
485 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
layout(binding = 0) uniform sampler2D uTextures[2][3][1];
layout(location = 0) flat in int vIndex;
layout(location = 1) in vec2 vUV;
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][y][x] = texture(uTextures[z][y][x], vUV);
FragColor = values3[1][2][0] + values3[0][2][0] + values3[vIndex + 1][2][vIndex];
}