53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
#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;
|
|
float const x_33 = f;
|
|
float const x_35 = f;
|
|
float const x_37 = f;
|
|
float const x_39 = f;
|
|
v = float4(sin(x_33), cos(x_35), exp2(x_37), log(x_39));
|
|
float4 const x_42 = v;
|
|
float4 const x_44 = (*(tint_symbol_3)).r;
|
|
if ((distance(x_42, x_44) < 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;
|
|
}
|
|
|