1cb93a386Sopenharmony_ci#include <metal_stdlib> 2cb93a386Sopenharmony_ci#include <simd/simd.h> 3cb93a386Sopenharmony_ciusing namespace metal; 4cb93a386Sopenharmony_cistruct Inputs { 5cb93a386Sopenharmony_ci}; 6cb93a386Sopenharmony_cistruct Outputs { 7cb93a386Sopenharmony_ci half4 sk_FragColor [[color(0)]]; 8cb93a386Sopenharmony_ci}; 9cb93a386Sopenharmony_cifloat3x4 float3x4_from_float4x4(float4x4 x0) { 10cb93a386Sopenharmony_ci return float3x4(float4(x0[0].xyzw), float4(x0[1].xyzw), float4(x0[2].xyzw)); 11cb93a386Sopenharmony_ci} 12cb93a386Sopenharmony_cifragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 13cb93a386Sopenharmony_ci Outputs _out; 14cb93a386Sopenharmony_ci (void)_out; 15cb93a386Sopenharmony_ci float3x4 a = float3x4(1.0); 16cb93a386Sopenharmony_ci float3x4 b = float3x4_from_float4x4(float4x4(1.0)); 17cb93a386Sopenharmony_ci _out.sk_FragColor.x = half(all(a[0] == b[0]) ? 0 : 1); 18cb93a386Sopenharmony_ci return _out; 19cb93a386Sopenharmony_ci} 20