2021-03-16 14:40:11 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
2021-02-03 22:44:47 +00:00
|
|
|
struct Uniforms {
|
|
|
|
float4 colorGreen;
|
|
|
|
};
|
2020-11-24 19:18:23 +00:00
|
|
|
struct Inputs {
|
|
|
|
};
|
|
|
|
struct Outputs {
|
|
|
|
float4 sk_FragColor [[color(0)]];
|
|
|
|
};
|
2021-02-03 22:44:47 +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 22:08:38 +00:00
|
|
|
float _0_x = 1.0;
|
|
|
|
_0_x = abs(_0_x);
|
|
|
|
_0_x = abs(_0_x - 2.0);
|
|
|
|
_0_x = (_0_x * 2.0);
|
|
|
|
_0_x = sign(_0_x);
|
|
|
|
float2 _1_x = float2(1.0, 2.0);
|
|
|
|
_1_x = float2(length(_1_x));
|
|
|
|
_1_x = float2(distance(_1_x, float2(3.0, 4.0)));
|
|
|
|
_1_x = float2(dot(_1_x, float2(3.0, 4.0)));
|
|
|
|
_1_x = normalize(_1_x);
|
2021-02-05 15:07:19 +00:00
|
|
|
_out.sk_FragColor = _uniforms.colorGreen;
|
2021-01-19 18:07:55 +00:00
|
|
|
return _out;
|
2020-11-24 19:18:23 +00:00
|
|
|
}
|