2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct buf0 {
|
|
|
|
/* 0x0000 */ packed_float2 resolution;
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper {
|
|
|
|
float4 arr[16];
|
|
|
|
};
|
|
|
|
struct main_out {
|
|
|
|
float4 x_GLF_color_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_2 {
|
|
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
|
|
|
void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float4* const tint_symbol_9) {
|
|
|
|
tint_array_wrapper indexable = {};
|
|
|
|
int x_71 = 0;
|
|
|
|
int x_71_phi = 0;
|
|
|
|
int x_74_phi = 0;
|
|
|
|
float4 const x_54 = *(tint_symbol_8);
|
|
|
|
float2 const x_55 = float2(x_54.x, x_54.y);
|
|
|
|
float2 const x_58 = x_6.resolution;
|
|
|
|
float2 const x_61 = ((x_55 / x_58) * 8.0f);
|
|
|
|
float2 const x_62 = floor(x_61);
|
2021-07-29 13:51:47 +00:00
|
|
|
int const x_69 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_62.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_62.y))));
|
2021-07-23 13:10:12 +00:00
|
|
|
x_71_phi = 0;
|
|
|
|
x_74_phi = x_69;
|
|
|
|
while (true) {
|
|
|
|
int x_85 = 0;
|
|
|
|
int x_86 = 0;
|
|
|
|
int x_75_phi = 0;
|
|
|
|
x_71 = x_71_phi;
|
|
|
|
int const x_74 = x_74_phi;
|
|
|
|
if ((x_74 > 1)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (((x_74 & 1) == 1)) {
|
2021-07-29 13:51:47 +00:00
|
|
|
x_85 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_74)))) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
x_75_phi = x_85;
|
|
|
|
} else {
|
|
|
|
x_86 = (x_74 / 2);
|
|
|
|
x_75_phi = x_86;
|
|
|
|
}
|
|
|
|
int const x_75 = x_75_phi;
|
|
|
|
{
|
2021-07-29 13:51:47 +00:00
|
|
|
x_71_phi = as_type<int>(as_type<int>((as_type<uint>(x_71) + as_type<uint>(as_type<int>(1)))));
|
2021-07-23 13:10:12 +00:00
|
|
|
x_74_phi = x_75;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tint_array_wrapper const tint_symbol_4 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
|
|
|
|
indexable = tint_symbol_4;
|
|
|
|
tint_array_wrapper const x_88 = indexable;
|
|
|
|
tint_array_wrapper const tint_symbol_5 = {.arr={float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)}};
|
|
|
|
indexable = tint_symbol_5;
|
|
|
|
indexable = x_88;
|
|
|
|
tint_array_wrapper const tint_symbol_6 = {.arr={float4(0.0f, 0.0f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), x_54, float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f)}};
|
|
|
|
float4 const x_89 = tint_symbol_6.arr[1u];
|
|
|
|
tint_array_wrapper const x_90 = {.arr={float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 8.0f, x_55), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(x_61, 0.5f, 1.0f)}};
|
|
|
|
float4 const x_92 = indexable.arr[as_type<int>((x_71 % 16))];
|
|
|
|
*(tint_symbol_9) = x_92;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
|
|
|
|
thread float4 tint_symbol_10 = 0.0f;
|
|
|
|
thread float4 tint_symbol_11 = 0.0f;
|
|
|
|
tint_symbol_10 = gl_FragCoord_param;
|
|
|
|
main_1(x_6, &(tint_symbol_10), &(tint_symbol_11));
|
|
|
|
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_11};
|
|
|
|
tint_symbol_2 const tint_symbol_7 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
|
|
|
|
return tint_symbol_7;
|
|
|
|
}
|
|
|
|
|