blob: a3e74a594c307b4bbd6f11c5b122db126b263ab8 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[2];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[2];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
float f1_f1_(thread float* const a) {
float const x_100 = *(a);
return dfdx(x_100);
}
void main_1(constant buf0& x_8, constant buf1& x_10, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
float4 v2 = 0.0f;
float a_1 = 0.0f;
float x_40 = 0.0f;
float param = 0.0f;
int const x_42 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_45 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_48 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_51 = x_8.x_GLF_uniform_int_values.arr[0].el;
*(tint_symbol_5) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
float const x_55 = (*(tint_symbol_6)).x;
float const x_57 = x_10.x_GLF_uniform_float_values.arr[1].el;
if ((x_55 < x_57)) {
float const x_62 = v2.x;
if (!((x_62 < 1.0f))) {
float const x_68 = x_10.x_GLF_uniform_float_values.arr[1].el;
float const x_70 = x_10.x_GLF_uniform_float_values.arr[1].el;
float const x_72 = x_10.x_GLF_uniform_float_values.arr[0].el;
if ((x_70 > x_72)) {
float const x_78 = x_10.x_GLF_uniform_float_values.arr[0].el;
param = x_78;
float const x_79 = f1_f1_(&(param));
x_40 = x_79;
} else {
float const x_81 = x_10.x_GLF_uniform_float_values.arr[0].el;
x_40 = x_81;
}
float const x_82 = x_40;
a_1 = (x_68 / x_82);
float const x_85 = x_10.x_GLF_uniform_float_values.arr[0].el;
float const x_88 = x_10.x_GLF_uniform_float_values.arr[0].el;
float const x_90 = a_1;
float3 const x_92 = mix(float3(x_85, x_85, x_85), float3(x_88, x_88, x_88), float3(x_90, x_90, x_90));
float const x_94 = x_10.x_GLF_uniform_float_values.arr[1].el;
*(tint_symbol_5) = float4(x_92.x, x_92.y, x_92.z, x_94);
}
}
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
thread float4 tint_symbol_7 = 0.0f;
thread float4 tint_symbol_8 = 0.0f;
tint_symbol_7 = gl_FragCoord_param;
main_1(x_8, x_10, &(tint_symbol_8), &(tint_symbol_7));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_4;
}