2022-03-21 16:09:17 +00:00
|
|
|
struct strided_arr {
|
|
|
|
@size(16)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : i32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr = array<strided_arr, 5u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf0 {
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_uniform_int_values : Arr,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-03-21 16:09:17 +00:00
|
|
|
struct strided_arr_1 {
|
|
|
|
@size(16)
|
2022-03-28 14:31:22 +00:00
|
|
|
el : f32,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 14:55:17 +00:00
|
|
|
alias Arr_1 = array<strided_arr_1, 3u>;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
struct buf1 {
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_uniform_float_values : Arr_1,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<uniform> x_6 : buf0;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(1) var<uniform> x_9 : buf1;
|
2021-07-23 13:10:12 +00:00
|
|
|
|
|
|
|
var<private> x_GLF_color : vec4<f32>;
|
|
|
|
|
|
|
|
fn main_1() {
|
|
|
|
var I : vec4<f32>;
|
|
|
|
var N : vec4<f32>;
|
|
|
|
var R : vec4<f32>;
|
2022-11-07 16:15:55 +00:00
|
|
|
var r : vec4<f32>;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_40 : i32 = x_6.x_GLF_uniform_int_values[2].el;
|
|
|
|
let x_43 : i32 = x_6.x_GLF_uniform_int_values[3].el;
|
|
|
|
let x_46 : i32 = x_6.x_GLF_uniform_int_values[4].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
I = bitcast<vec4<f32>>(vec4<u32>(bitcast<u32>(x_40), bitcast<u32>(x_43), bitcast<u32>(x_46), 92985u));
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_51 : f32 = x_9.x_GLF_uniform_float_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
N = vec4<f32>(x_51, x_51, x_51, x_51);
|
|
|
|
let x_53 : vec4<f32> = I;
|
|
|
|
R = reflect(x_53, vec4<f32>(0.5, 0.5, 0.5, 0.5));
|
|
|
|
let x_55 : vec4<f32> = I;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_57 : f32 = x_9.x_GLF_uniform_float_values[2].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_58 : vec4<f32> = N;
|
|
|
|
let x_59 : vec4<f32> = I;
|
|
|
|
let x_62 : vec4<f32> = N;
|
2022-11-07 16:15:55 +00:00
|
|
|
r = (x_55 - (x_62 * (x_57 * dot(x_58, x_59))));
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_65 : vec4<f32> = R;
|
2022-11-07 16:15:55 +00:00
|
|
|
let x_66 : vec4<f32> = r;
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_69 : f32 = x_9.x_GLF_uniform_float_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((distance(x_65, x_66) < x_69)) {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_75 : i32 = x_6.x_GLF_uniform_int_values[0].el;
|
|
|
|
let x_78 : i32 = x_6.x_GLF_uniform_int_values[1].el;
|
|
|
|
let x_81 : i32 = x_6.x_GLF_uniform_int_values[1].el;
|
|
|
|
let x_84 : i32 = x_6.x_GLF_uniform_int_values[0].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
x_GLF_color = vec4<f32>(f32(x_75), f32(x_78), f32(x_81), f32(x_84));
|
|
|
|
} else {
|
2022-03-21 16:09:17 +00:00
|
|
|
let x_88 : i32 = x_6.x_GLF_uniform_int_values[1].el;
|
2021-07-23 13:10:12 +00:00
|
|
|
let x_89 : f32 = f32(x_88);
|
|
|
|
x_GLF_color = vec4<f32>(x_89, x_89, x_89, x_89);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct main_out {
|
2022-01-19 22:46:57 +00:00
|
|
|
@location(0)
|
2022-03-28 14:31:22 +00:00
|
|
|
x_GLF_color_1 : vec4<f32>,
|
2022-03-21 16:09:17 +00:00
|
|
|
}
|
2021-07-23 13:10:12 +00:00
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@fragment
|
2021-07-23 13:10:12 +00:00
|
|
|
fn main() -> main_out {
|
|
|
|
main_1();
|
|
|
|
return main_out(x_GLF_color);
|
|
|
|
}
|