2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct buf0 {
|
2021-08-23 21:45:23 +00:00
|
|
|
/* 0x0000 */ float2 resolution;
|
2021-07-23 13:10:12 +00:00
|
|
|
};
|
|
|
|
struct tint_array_wrapper {
|
|
|
|
float4 arr[8];
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper_1 {
|
|
|
|
float4 arr[16];
|
|
|
|
};
|
|
|
|
struct main_out {
|
|
|
|
float4 x_GLF_color_1;
|
|
|
|
};
|
2021-08-04 22:15:28 +00:00
|
|
|
struct tint_symbol_1 {
|
2021-07-23 13:10:12 +00:00
|
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) {
|
2021-07-23 13:10:12 +00:00
|
|
|
tint_array_wrapper x_81 = {.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)}};
|
|
|
|
tint_array_wrapper x_82 = {};
|
|
|
|
tint_array_wrapper x_83 = {};
|
|
|
|
tint_array_wrapper x_84 = {};
|
|
|
|
tint_array_wrapper_1 x_85 = {};
|
|
|
|
float4 x_95 = 0.0f;
|
|
|
|
float4 x_95_phi = 0.0f;
|
|
|
|
int x_98_phi = 0;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper const tint_symbol_2 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
|
|
|
|
x_81 = tint_symbol_2;
|
2021-07-23 13:10:12 +00:00
|
|
|
tint_array_wrapper const x_86 = x_81;
|
2021-08-04 22:15:28 +00:00
|
|
|
float4 const x_87 = *(tint_symbol_7);
|
2021-07-23 13:10:12 +00:00
|
|
|
float2 const x_90 = x_6.resolution;
|
|
|
|
float2 const x_93 = floor(((float2(x_87.x, x_87.y) / x_90) * 32.0f));
|
|
|
|
x_95_phi = float4(0.5f, 0.5f, 1.0f, 1.0f);
|
|
|
|
x_98_phi = 0;
|
|
|
|
while (true) {
|
|
|
|
float4 x_142 = 0.0f;
|
|
|
|
int x_99 = 0;
|
|
|
|
bool x_127_phi = false;
|
|
|
|
float4 x_96_phi = 0.0f;
|
|
|
|
x_95 = x_95_phi;
|
|
|
|
int const x_98 = x_98_phi;
|
|
|
|
if ((x_98 < 8)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
float4 x_104 = 0.0f;
|
|
|
|
x_82 = x_86;
|
|
|
|
x_104 = x_82.arr[x_98];
|
|
|
|
switch(0u) {
|
|
|
|
default: {
|
|
|
|
float const x_107 = x_93.x;
|
|
|
|
float const x_108 = x_104.x;
|
|
|
|
if ((x_107 < x_108)) {
|
|
|
|
x_127_phi = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
float const x_112 = x_93.y;
|
|
|
|
float const x_113 = x_104.y;
|
|
|
|
if ((x_112 < x_113)) {
|
|
|
|
x_127_phi = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ((x_107 > (x_108 + x_104.z))) {
|
|
|
|
x_127_phi = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if ((x_112 > (x_113 + x_104.w))) {
|
|
|
|
x_127_phi = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
x_127_phi = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bool const x_127 = x_127_phi;
|
|
|
|
x_96_phi = x_95;
|
|
|
|
if (x_127) {
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper const tint_symbol_3 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
|
|
|
|
x_83 = tint_symbol_3;
|
2021-07-23 13:10:12 +00:00
|
|
|
float const x_131 = x_83.arr[x_98].x;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper const tint_symbol_4 = {.arr={float4(4.0f, 4.0f, 20.0f, 4.0f), float4(4.0f, 4.0f, 4.0f, 20.0f), float4(4.0f, 20.0f, 20.0f, 4.0f), float4(20.0f, 4.0f, 4.0f, 8.0f), float4(8.0f, 6.0f, 4.0f, 2.0f), float4(2.0f, 12.0f, 2.0f, 4.0f), float4(16.0f, 2.0f, 4.0f, 4.0f), float4(12.0f, 22.0f, 4.0f, 4.0f)}};
|
|
|
|
x_84 = tint_symbol_4;
|
2021-07-23 13:10:12 +00:00
|
|
|
float const x_134 = x_84.arr[x_98].y;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper_1 const tint_symbol_5 = {.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)}};
|
|
|
|
x_85 = tint_symbol_5;
|
2021-07-30 18:59:06 +00:00
|
|
|
x_142 = x_85.arr[(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
|
2021-07-23 13:10:12 +00:00
|
|
|
x_96_phi = x_142;
|
|
|
|
}
|
|
|
|
float4 const x_96 = x_96_phi;
|
|
|
|
{
|
2021-07-30 18:59:06 +00:00
|
|
|
x_99 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
x_95_phi = x_96;
|
|
|
|
x_98_phi = x_99;
|
|
|
|
}
|
|
|
|
}
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_8) = x_95;
|
2021-07-23 13:10:12 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out tint_symbol_inner(constant buf0& x_6, float4 gl_FragCoord_param, thread float4* const tint_symbol_9, thread float4* const tint_symbol_10) {
|
|
|
|
*(tint_symbol_9) = gl_FragCoord_param;
|
|
|
|
main_1(x_6, tint_symbol_9, tint_symbol_10);
|
|
|
|
main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_10)};
|
|
|
|
return tint_symbol_6;
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[buffer(0)]]) {
|
2021-07-23 13:10:12 +00:00
|
|
|
thread float4 tint_symbol_11 = 0.0f;
|
|
|
|
thread float4 tint_symbol_12 = 0.0f;
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out const inner_result = tint_symbol_inner(x_6, gl_FragCoord_param, &(tint_symbol_11), &(tint_symbol_12));
|
|
|
|
tint_symbol_1 wrapper_result = {};
|
|
|
|
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
|
|
|
return wrapper_result;
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
|