Debian Codegraph @

third_party/spirv-cross/reference/shaders-hlsl/frag/complex-expression-in-access-chain.frag

raw
1 RWByteAddressBuffer _34 : register(u0);
2 Texture2D<int4> Buf : register(t1);
3 SamplerState _Buf_sampler : register(s1);
4
5 static float4 gl_FragCoord;
6 static int vIn;
7 static int vIn2;
8 static float4 FragColor;
9
10 struct SPIRV_Cross_Input
11 {
12 nointerpolation int vIn : TEXCOORD0;
13 nointerpolation int vIn2 : TEXCOORD1;
14 float4 gl_FragCoord : SV_Position;
15 };
16
17 struct SPIRV_Cross_Output
18 {
19 float4 FragColor : SV_Target0;
20 };
21
22 void frag_main()
23 {
24 int4 coords = Buf.Load(int3(int2(gl_FragCoord.xy), 0));
25 float4 foo = asfloat(_34.Load4((coords.x % 16) * 16 + 0));
26 int c = vIn * vIn;
27 int d = vIn2 * vIn2;
28 FragColor = (foo + foo) + asfloat(_34.Load4((c + d) * 16 + 0));
29 }
30
31 SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
32 {
33 gl_FragCoord = stage_input.gl_FragCoord;
34 gl_FragCoord.w = 1.0 / gl_FragCoord.w;
35 vIn = stage_input.vIn;
36 vIn2 = stage_input.vIn2;
37 frag_main();
38 SPIRV_Cross_Output stage_output;
39 stage_output.FragColor = FragColor;
40 return stage_output;
41 }