blob: d8b42990fd89c958dc1a681fd4b4a4ea4d1093fb [file] [log] [blame]
John Stilesaeae3a52020-09-25 13:35:58 -04001#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
John Stilesecd7c222021-02-08 14:20:28 -05004struct Uniforms {
5 float unknownInput;
6};
John Stilesaeae3a52020-09-25 13:35:58 -04007struct Inputs {
8};
9struct Outputs {
10 float4 sk_FragColor [[color(0)]];
11};
John Stilesecd7c222021-02-08 14:20:28 -050012
13fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
John Stilesf7410bd2021-01-19 13:07:55 -050014 Outputs _out;
John Stiles37279172021-01-21 22:24:28 -050015 (void)_out;
Brian Osmanc0213602020-10-06 14:43:32 -040016 float r;
17 float g;
18
John Stilesecd7c222021-02-08 14:20:28 -050019 r = 1.0 - _uniforms.unknownInput;
20 g = _uniforms.unknownInput;
21 _out.sk_FragColor = float4(r, g, 0.0, 1.0);
John Stilesf7410bd2021-01-19 13:07:55 -050022 return _out;
John Stilesaeae3a52020-09-25 13:35:58 -040023}