Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame^] | 1 | struct Uniforms { |
John Stiles | 3679cd1 | 2020-12-09 16:22:12 -0500 | [diff] [blame] | 2 | float a; |
| 3 | }; |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame^] | 4 | struct Inputs { |
| 5 | }; |
John Stiles | 3679cd1 | 2020-12-09 16:22:12 -0500 | [diff] [blame] | 6 | struct Outputs { |
| 7 | float4 sk_FragColor [[color(0)]]; |
| 8 | }; |
| 9 | |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame^] | 10 | 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] | 11 | Outputs _out; |
John Stiles | 3727917 | 2021-01-21 22:24:28 -0500 | [diff] [blame] | 12 | (void)_out; |
Brian Osman | 8c595fe | 2021-03-15 14:58:57 -0400 | [diff] [blame^] | 13 | _out.sk_FragColor.x = float(isnan(_uniforms.a) ? 1 : 0); |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 14 | return _out; |
John Stiles | 3679cd1 | 2020-12-09 16:22:12 -0500 | [diff] [blame] | 15 | } |