| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct main0_out |
| 7 |
{ |
| 8 |
float FragColor [[color(0)]]; |
| 9 |
}; |
| 10 |
|
| 11 |
struct main0_in |
| 12 |
{ |
| 13 |
float vColor [[user(locn0)]]; |
| 14 |
}; |
| 15 |
|
| 16 |
#line 8 "test.frag" |
| 17 |
fragment main0_out main0(main0_in in [[stage_in]]) |
| 18 |
{ |
| 19 |
main0_out out = {}; |
| 20 |
#line 8 "test.frag" |
| 21 |
out.FragColor = 1.0; |
| 22 |
#line 9 "test.frag" |
| 23 |
out.FragColor = 2.0; |
| 24 |
#line 10 "test.frag" |
| 25 |
if (in.vColor < 0.0) |
| 26 |
{ |
| 27 |
#line 12 "test.frag" |
| 28 |
out.FragColor = 3.0; |
| 29 |
} |
| 30 |
else |
| 31 |
{ |
| 32 |
#line 16 "test.frag" |
| 33 |
out.FragColor = 4.0; |
| 34 |
} |
| 35 |
for (int _127 = 0; float(_127) < (40.0 + in.vColor); ) |
| 36 |
{ |
| 37 |
#line 21 "test.frag" |
| 38 |
out.FragColor += 0.20000000298023223876953125; |
| 39 |
#line 22 "test.frag" |
| 40 |
out.FragColor += 0.300000011920928955078125; |
| 41 |
_127 += (int(in.vColor) + 5); |
| 42 |
continue; |
| 43 |
} |
| 44 |
switch (int(in.vColor)) |
| 45 |
{ |
| 46 |
case 0: |
| 47 |
{ |
| 48 |
#line 28 "test.frag" |
| 49 |
out.FragColor += 0.20000000298023223876953125; |
| 50 |
#line 29 "test.frag" |
| 51 |
break; |
| 52 |
} |
| 53 |
case 1: |
| 54 |
{ |
| 55 |
#line 32 "test.frag" |
| 56 |
out.FragColor += 0.4000000059604644775390625; |
| 57 |
#line 33 "test.frag" |
| 58 |
break; |
| 59 |
} |
| 60 |
default: |
| 61 |
{ |
| 62 |
#line 36 "test.frag" |
| 63 |
out.FragColor += 0.800000011920928955078125; |
| 64 |
#line 37 "test.frag" |
| 65 |
break; |
| 66 |
} |
| 67 |
} |
| 68 |
for (;;) |
| 69 |
{ |
| 70 |
out.FragColor += (10.0 + in.vColor); |
| 71 |
#line 43 "test.frag" |
| 72 |
if (out.FragColor < 100.0) |
| 73 |
{ |
| 74 |
} |
| 75 |
else |
| 76 |
{ |
| 77 |
break; |
| 78 |
} |
| 79 |
} |
| 80 |
return out; |
| 81 |
} |
| 82 |
|