1#include <metal_stdlib> 2#include <simd/simd.h> 3#ifdef __clang__ 4#pragma clang diagnostic ignored "-Wall" 5#endif 6using namespace metal; 7struct Inputs { 8}; 9struct Outputs { 10 half4 sk_FragColor [[color(0)]]; 11}; 12fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 13 Outputs _out; 14 (void)_out; 15 bool3 B; 16 B.x = true; 17 B.y = true; 18 B.z = true; 19 float3 F; 20 F.x = 1.23; 21 F.y = 0.0; 22 F.z = 1.0; 23 int3 I; 24 I.x = 1; 25 I.y = 1; 26 I.z = 1; 27 _out.sk_FragColor = half4(half((F.x * F.y) * F.z), half((B.x && B.y) && B.z), 0.0h, half((I.x * I.y) * I.z)); 28 return _out; 29} 30