Debian Codegraph @

third_party/spirv-cross/reference/opt/shaders/frag/lut-promotion.frag

raw
1 #version 310 es
2 precision mediump float;
3 precision highp int;
4
5 const float _16[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
6 const vec4 _60[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0));
7 const vec4 _104[4] = vec4[](vec4(20.0), vec4(30.0), vec4(50.0), vec4(60.0));
8
9 layout(location = 0) out float FragColor;
10 layout(location = 0) flat in mediump int index;
11
12 void main()
13 {
14 FragColor = _16[index];
15 if (index < 10)
16 {
17 FragColor += _16[index ^ 1];
18 }
19 else
20 {
21 FragColor += _16[index & 1];
22 }
23 bool _63 = index > 30;
24 if (_63)
25 {
26 FragColor += _60[index & 3].y;
27 }
28 else
29 {
30 FragColor += _60[index & 1].x;
31 }
32 vec4 foobar[4] = _60;
33 if (_63)
34 {
35 foobar[1].z = 20.0;
36 }
37 mediump int _91 = index & 3;
38 FragColor += foobar[_91].z;
39 FragColor += _104[_91].z;
40 }
41