Debian Codegraph @

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

raw
1 static const float _16[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f };
2 static const float4 _60[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx };
3 static const float4 _104[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx };
4
5 static float FragColor;
6 static int index;
7
8 struct SPIRV_Cross_Input
9 {
10 nointerpolation int index : TEXCOORD0;
11 };
12
13 struct SPIRV_Cross_Output
14 {
15 float FragColor : SV_Target0;
16 };
17
18 void frag_main()
19 {
20 FragColor = _16[index];
21 if (index < 10)
22 {
23 FragColor += _16[index ^ 1];
24 }
25 else
26 {
27 FragColor += _16[index & 1];
28 }
29 bool _63 = index > 30;
30 if (_63)
31 {
32 FragColor += _60[index & 3].y;
33 }
34 else
35 {
36 FragColor += _60[index & 1].x;
37 }
38 float4 foobar[4] = _60;
39 if (_63)
40 {
41 foobar[1].z = 20.0f;
42 }
43 int _91 = index & 3;
44 FragColor += foobar[_91].z;
45 FragColor += _104[_91].z;
46 }
47
48 SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
49 {
50 index = stage_input.index;
51 frag_main();
52 SPIRV_Cross_Output stage_output;
53 stage_output.FragColor = FragColor;
54 return stage_output;
55 }