John Stiles | 3679cd1 | 2020-12-09 16:22:12 -0500 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | using namespace metal; |
| 4 | struct Inputs { |
| 5 | float a; |
| 6 | }; |
| 7 | struct Outputs { |
| 8 | float4 sk_FragColor [[color(0)]]; |
| 9 | }; |
| 10 | |
| 11 | fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame^] | 12 | Outputs _out; |
| 13 | _out.sk_FragColor.x = float(isnan(_in.a) ? 1 : 0); |
| 14 | return _out; |
John Stiles | 3679cd1 | 2020-12-09 16:22:12 -0500 | [diff] [blame] | 15 | } |