blob: ad71b07de62ee3d165252301d01b03d277bcd284 [file] [log] [blame]
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00001struct buf0 {
James Price3b671cb2022-03-28 14:31:22 +00002 two : f32,
James Price1a72a762022-03-21 16:09:17 +00003}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00004
5var<private> gl_FragCoord : vec4<f32>;
6
Ben Clayton01e4b6f2022-01-19 22:46:57 +00007@group(0) @binding(0) var<uniform> x_8 : buf0;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00008
9var<private> x_GLF_color : vec4<f32>;
10
11fn main_1() {
12 var a : f32;
13 var b : f32;
14 let x_33 : f32 = gl_FragCoord.x;
15 a = dpdx(cos(x_33));
16 let x_37 : f32 = x_8.two;
17 let x_38 : f32 = a;
18 b = mix(2.0, x_37, x_38);
19 let x_40 : f32 = b;
20 let x_42 : f32 = b;
James Price1a72a762022-03-21 16:09:17 +000021 if (((x_40 >= 1.899999976) & (x_42 <= 2.099999905))) {
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000022 x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
23 } else {
24 x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
25 }
26 return;
27}
28
29struct main_out {
Ben Clayton01e4b6f2022-01-19 22:46:57 +000030 @location(0)
James Price3b671cb2022-03-28 14:31:22 +000031 x_GLF_color_1 : vec4<f32>,
James Price1a72a762022-03-21 16:09:17 +000032}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000033
dan sinclairb29892b2022-06-07 13:55:34 +000034@fragment
Ben Clayton01e4b6f2022-01-19 22:46:57 +000035fn main(@builtin(position) gl_FragCoord_param : vec4<f32>) -> main_out {
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000036 gl_FragCoord = gl_FragCoord_param;
37 main_1();
38 return main_out(x_GLF_color);
39}