Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl-no-opt/asm/frag/component-insert-packed-expression.asm.frag

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct type_Globals
7 {
8 float4 _BorderWidths[4];
9 };
10
11 struct main0_out
12 {
13 float4 out_var_SV_Target [[color(0)]];
14 };
15
16 fragment main0_out main0(constant type_Globals& _Globals [[buffer(0)]], float4 gl_FragCoord [[position]])
17 {
18 main0_out out = {};
19 float2 _31 = float2(_Globals._BorderWidths[0].x, _Globals._BorderWidths[1].x);
20 float2 _39;
21 if (gl_FragCoord.x > 0.0)
22 {
23 float2 _38 = _31;
24 _38.x = _Globals._BorderWidths[2].x;
25 _39 = _38;
26 }
27 else
28 {
29 _39 = _31;
30 }
31 out.out_var_SV_Target = float4(_39, 0.0, 1.0);
32 return out;
33 }
34