2021-03-16 14:40:11 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
2021-05-24 14:52:23 +00:00
|
|
|
struct Uniforms {
|
|
|
|
float4 colorWhite;
|
|
|
|
};
|
2021-01-26 18:03:40 +00:00
|
|
|
struct Inputs {
|
|
|
|
};
|
|
|
|
struct Outputs {
|
|
|
|
float4 sk_FragColor [[color(0)]];
|
|
|
|
};
|
2021-05-24 14:52:23 +00:00
|
|
|
fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
|
2021-01-26 18:03:40 +00:00
|
|
|
Outputs _out;
|
|
|
|
(void)_out;
|
2021-02-01 16:52:10 +00:00
|
|
|
float4 color = float4(0.0);
|
2021-03-04 15:19:48 +00:00
|
|
|
for (int counter = 0;counter < 10; ++counter) {
|
|
|
|
}
|
2021-03-04 15:46:39 +00:00
|
|
|
for (int counter = 0;counter < 10; ++counter) {
|
|
|
|
}
|
|
|
|
for (int counter = 0;counter < 10; ++counter) {
|
|
|
|
}
|
2021-05-24 14:52:23 +00:00
|
|
|
if (_uniforms.colorWhite.x == 1.0) color.y = 1.0;
|
|
|
|
if (_uniforms.colorWhite.x == 2.0) ; else color.w = 1.0;
|
|
|
|
while (_uniforms.colorWhite.x == 2.0) ;
|
|
|
|
do ; while (_uniforms.colorWhite.x == 2.0);
|
2021-01-26 18:03:40 +00:00
|
|
|
_out.sk_FragColor = color;
|
|
|
|
return _out;
|
|
|
|
}
|