2021-03-15 18:58:57 +00:00
|
|
|
struct Uniforms {
|
2020-10-06 18:43:32 +00:00
|
|
|
float4 src;
|
|
|
|
float4 dst;
|
2020-09-25 17:35:58 +00:00
|
|
|
};
|
2021-03-15 18:58:57 +00:00
|
|
|
struct Inputs {
|
|
|
|
};
|
2020-09-25 17:35:58 +00:00
|
|
|
struct Outputs {
|
|
|
|
float4 sk_FragColor [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-03-15 18:58:57 +00:00
|
|
|
fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
2021-01-19 18:07:55 +00:00
|
|
|
Outputs _out;
|
2021-01-22 03:24:28 +00:00
|
|
|
(void)_out;
|
2021-03-15 18:58:57 +00:00
|
|
|
float4 _0_result = _uniforms.src + (1.0 - _uniforms.src.w) * _uniforms.dst;
|
|
|
|
_0_result.xyz = max(_0_result.xyz, (1.0 - _uniforms.dst.w) * _uniforms.src.xyz + _uniforms.dst.xyz);
|
2021-03-15 22:08:38 +00:00
|
|
|
_out.sk_FragColor = _0_result;
|
2021-01-19 18:07:55 +00:00
|
|
|
return _out;
|
2020-09-25 17:35:58 +00:00
|
|
|
}
|