2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct main_out {
|
|
|
|
float4 color_out_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_2 {
|
|
|
|
float4 frag_color_param [[user(locn1)]];
|
|
|
|
};
|
|
|
|
struct tint_symbol_3 {
|
|
|
|
float4 color_out_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
|
2021-07-23 13:10:12 +00:00
|
|
|
int2 iv = 0;
|
2021-08-04 22:15:28 +00:00
|
|
|
float4 const x_28 = *(tint_symbol_5);
|
2021-07-23 13:10:12 +00:00
|
|
|
iv = int2((float2(x_28.x, x_28.y) * 256.0f));
|
|
|
|
int const x_33 = iv.y;
|
|
|
|
if ((((x_33 / 2) & 64) == 64)) {
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
2021-07-23 13:10:12 +00:00
|
|
|
} else {
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_6) = float4(0.0f, 1.0f, 1.0f, 1.0f);
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out tint_symbol_inner(float4 frag_color_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
|
|
|
|
*(tint_symbol_7) = frag_color_param;
|
|
|
|
main_1(tint_symbol_7, tint_symbol_8);
|
|
|
|
main_out const tint_symbol_4 = {.color_out_1=*(tint_symbol_8)};
|
|
|
|
return tint_symbol_4;
|
|
|
|
}
|
|
|
|
|
2021-07-23 13:10:12 +00:00
|
|
|
fragment tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
|
|
|
|
thread float4 tint_symbol_9 = 0.0f;
|
2021-08-04 22:15:28 +00:00
|
|
|
thread float4 tint_symbol_10 = 0.0f;
|
|
|
|
main_out const inner_result = tint_symbol_inner(tint_symbol_1.frag_color_param, &(tint_symbol_9), &(tint_symbol_10));
|
|
|
|
tint_symbol_3 wrapper_result = {};
|
|
|
|
wrapper_result.color_out_1 = inner_result.color_out_1;
|
|
|
|
return wrapper_result;
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
|