John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | using namespace metal; |
| 4 | struct Inputs { |
| 5 | }; |
| 6 | struct Outputs { |
| 7 | float4 sk_FragColor [[color(0)]]; |
| 8 | }; |
| 9 | 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] | 10 | Outputs _out; |
John Stiles | 3727917 | 2021-01-21 22:24:28 -0500 | [diff] [blame] | 11 | (void)_out; |
Brian Osman | c021360 | 2020-10-06 14:43:32 -0400 | [diff] [blame] | 12 | float r; |
| 13 | float g; |
| 14 | |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 15 | r = sqrt(1.0); |
| 16 | g = sqrt(0.0); |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 17 | _out.sk_FragColor.x = r; |
| 18 | _out.sk_FragColor.y = g; |
| 19 | return _out; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 20 | } |