blob: 46ada67bebae9308098f66f36fe2773a725be5ab [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_private_vars_struct {
float4 x_GLF_color;
};
struct buf0 {
/* 0x0000 */ float4 r;
};
void main_1(thread tint_private_vars_struct* const tint_private_vars, const constant buf0* const tint_symbol_3) {
float f = 0.0f;
float4 v = 0.0f;
f = 1.0f;
v = float4(sin(f), cos(f), exp2(f), log(f));
if ((distance(v, (*(tint_symbol_3)).r) < 0.10000000149011611938f)) {
(*(tint_private_vars)).x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
(*(tint_private_vars)).x_GLF_color = float4(0.0f);
}
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
main_out tint_symbol_inner(thread tint_private_vars_struct* const tint_private_vars, const constant buf0* const tint_symbol_4) {
main_1(tint_private_vars, tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=(*(tint_private_vars)).x_GLF_color};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_5 [[buffer(0)]]) {
thread tint_private_vars_struct tint_private_vars = {};
main_out const inner_result = tint_symbol_inner(&(tint_private_vars), tint_symbol_5);
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}