Debian Codegraph @

third_party/spirv-cross/reference/opt/shaders/frag/constant-array.frag

raw
1 #version 310 es
2 precision mediump float;
3 precision highp int;
4
5 struct Foobar
6 {
7 float a;
8 float b;
9 };
10
11 const vec4 _37[3] = vec4[](vec4(1.0), vec4(2.0), vec4(3.0));
12 const vec4 _55[2][2] = vec4[][](vec4[](vec4(1.0), vec4(2.0)), vec4[](vec4(8.0), vec4(10.0)));
13 const Foobar _75[2] = Foobar[](Foobar(10.0, 40.0), Foobar(90.0, 70.0));
14
15 layout(location = 0) out vec4 FragColor;
16 layout(location = 0) flat in mediump int index;
17
18 void main()
19 {
20 FragColor = ((_37[index] + _55[index][index + 1]) + vec4(30.0)) + vec4(_75[index].a + _75[index].b);
21 }
22