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; |
John Stiles | ecd7c22 | 2021-02-08 14:20:28 -0500 | [diff] [blame^] | 4 | struct Uniforms { |
| 5 | float unknownInput; |
| 6 | }; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 7 | struct Inputs { |
| 8 | }; |
| 9 | struct Outputs { |
| 10 | float4 sk_FragColor [[color(0)]]; |
| 11 | }; |
John Stiles | ecd7c22 | 2021-02-08 14:20:28 -0500 | [diff] [blame^] | 12 | |
| 13 | fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 14 | Outputs _out; |
John Stiles | 3727917 | 2021-01-21 22:24:28 -0500 | [diff] [blame] | 15 | (void)_out; |
Brian Osman | c021360 | 2020-10-06 14:43:32 -0400 | [diff] [blame] | 16 | float r; |
| 17 | float g; |
| 18 | |
John Stiles | ecd7c22 | 2021-02-08 14:20:28 -0500 | [diff] [blame^] | 19 | r = 1.0 - _uniforms.unknownInput; |
| 20 | g = _uniforms.unknownInput; |
| 21 | _out.sk_FragColor = float4(r, g, 0.0, 1.0); |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 22 | return _out; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 23 | } |