1[[block]] 2struct buf0 { 3 resolution : vec2<f32>; 4}; 5 6var<private> gl_FragCoord : vec4<f32>; 7 8[[group(0), binding(0)]] var<uniform> x_10 : buf0; 9 10var<private> x_GLF_color : vec4<f32>; 11 12fn collatz_i1_(v : ptr<function, i32>) -> i32 { 13 var count : i32; 14 count = 0; 15 loop { 16 let x_89 : i32 = *(v); 17 if ((x_89 > 1)) { 18 } else { 19 break; 20 } 21 let x_92 : i32 = *(v); 22 if (((x_92 & 1) == 1)) { 23 let x_98 : i32 = *(v); 24 *(v) = ((3 * x_98) + 1); 25 } else { 26 let x_101 : i32 = *(v); 27 *(v) = (x_101 / 2); 28 } 29 let x_103 : i32 = count; 30 count = (x_103 + 1); 31 } 32 let x_105 : i32 = count; 33 return x_105; 34} 35 36fn main_1() { 37 var lin : vec2<f32>; 38 var v_1 : i32; 39 var param : i32; 40 var indexable : array<vec4<f32>, 16>; 41 let x_63 : vec4<f32> = gl_FragCoord; 42 let x_66 : vec2<f32> = x_10.resolution; 43 lin = (vec2<f32>(x_63.x, x_63.y) / x_66); 44 let x_68 : vec2<f32> = lin; 45 lin = floor((x_68 * 8.0)); 46 let x_72 : f32 = lin.x; 47 let x_76 : f32 = lin.y; 48 v_1 = ((i32(x_72) * 8) + i32(x_76)); 49 let x_79 : i32 = v_1; 50 param = x_79; 51 let x_80 : i32 = collatz_i1_(&(param)); 52 indexable = array<vec4<f32>, 16>(vec4<f32>(0.0, 0.0, 0.0, 1.0), vec4<f32>(0.5, 0.0, 0.0, 1.0), vec4<f32>(0.0, 0.5, 0.0, 1.0), vec4<f32>(0.5, 0.5, 0.0, 1.0), vec4<f32>(0.0, 0.0, 0.5, 1.0), vec4<f32>(0.5, 0.0, 0.5, 1.0), vec4<f32>(0.0, 0.5, 0.5, 1.0), vec4<f32>(0.5, 0.5, 0.5, 1.0), vec4<f32>(0.0, 0.0, 0.0, 1.0), vec4<f32>(1.0, 0.0, 0.0, 1.0), vec4<f32>(0.0, 1.0, 0.0, 1.0), vec4<f32>(1.0, 1.0, 0.0, 1.0), vec4<f32>(0.0, 0.0, 1.0, 1.0), vec4<f32>(1.0, 0.0, 1.0, 1.0), vec4<f32>(0.0, 1.0, 1.0, 1.0), vec4<f32>(1.0, 1.0, 1.0, 1.0)); 53 let x_83 : vec4<f32> = indexable[(x_80 % 16)]; 54 x_GLF_color = x_83; 55 return; 56} 57 58struct main_out { 59 [[location(0)]] 60 x_GLF_color_1 : vec4<f32>; 61}; 62 63[[stage(fragment)]] 64fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out { 65 gl_FragCoord = gl_FragCoord_param; 66 main_1(); 67 return main_out(x_GLF_color); 68} 69