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_6 : buf0; 9 10var<private> x_GLF_color : vec4<f32>; 11 12fn main_1() { 13 var indexable : array<vec4<f32>, 16>; 14 var x_72 : i32; 15 var x_72_phi : i32; 16 var x_75_phi : i32; 17 let x_54 : vec4<f32> = gl_FragCoord; 18 let x_55 : vec2<f32> = vec2<f32>(x_54.x, x_54.y); 19 let x_58 : vec2<f32> = x_6.resolution; 20 let x_59 : vec2<f32> = (x_55 / x_58); 21 let x_70 : i32 = (i32((x_59.x * vec4<f32>(vec4<f32>(0.0, x_55, 0.5).w, 10.0, vec2<f32>(0.0, 0.0)).y)) + (i32((x_59.y * 10.0)) * 10)); 22 x_72_phi = 100; 23 x_75_phi = 0; 24 loop { 25 var x_73 : i32; 26 var x_76 : i32; 27 x_72 = x_72_phi; 28 let x_75 : i32 = x_75_phi; 29 if ((x_75 < x_70)) { 30 } else { 31 break; 32 } 33 34 continuing { 35 x_73 = (((4 * bitcast<i32>(x_72)) * (1000 - bitcast<i32>(x_72))) / 1000); 36 x_76 = (x_75 + 1); 37 x_72_phi = x_73; 38 x_75_phi = x_76; 39 } 40 } 41 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)); 42 let x_84 : vec4<f32> = indexable[bitcast<i32>((x_72 % 16))]; 43 x_GLF_color = x_84; 44 return; 45} 46 47struct main_out { 48 [[location(0)]] 49 x_GLF_color_1 : vec4<f32>; 50}; 51 52[[stage(fragment)]] 53fn main([[builtin(position)]] gl_FragCoord_param : vec4<f32>) -> main_out { 54 gl_FragCoord = gl_FragCoord_param; 55 main_1(); 56 return main_out(x_GLF_color); 57} 58