blob: 3f8e233db3a196b739b5aded09ba596dc82dd8b5 [file] [log] [blame]
Ben Clayton4d3ff972023-02-21 17:33:54 +00001var<private> pos : vec4<f32>;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00002
3var<private> frag_color : vec4<f32>;
4
5var<private> gl_Position : vec4<f32>;
6
7fn main_1() {
Ben Clayton4d3ff972023-02-21 17:33:54 +00008 let x_21 : vec4<f32> = pos;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +00009 gl_Position = x_21;
Ben Clayton4d3ff972023-02-21 17:33:54 +000010 let x_23 : vec4<f32> = pos;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000011 frag_color = (x_23 * 0.5);
12 return;
13}
14
15struct main_out {
Ben Clayton01e4b6f2022-01-19 22:46:57 +000016 @builtin(position)
James Price3b671cb2022-03-28 14:31:22 +000017 gl_Position : vec4<f32>,
Ben Clayton01e4b6f2022-01-19 22:46:57 +000018 @location(1)
James Price3b671cb2022-03-28 14:31:22 +000019 frag_color_1 : vec4<f32>,
James Price1a72a762022-03-21 16:09:17 +000020}
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000021
dan sinclairb29892b2022-06-07 13:55:34 +000022@vertex
Ben Clayton01e4b6f2022-01-19 22:46:57 +000023fn main(@location(0) position_param : vec4<f32>) -> main_out {
Ben Clayton4d3ff972023-02-21 17:33:54 +000024 pos = position_param;
Alastair Donaldsonf7e73d42021-07-23 13:10:12 +000025 main_1();
26 return main_out(gl_Position, frag_color);
27}