James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 1 | struct VertexInputs { |
Ben Clayton | 01e4b6f | 2022-01-19 22:46:57 +0000 | [diff] [blame] | 2 | @builtin(vertex_index) |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 3 | vertex_index : u32; |
Ben Clayton | 01e4b6f | 2022-01-19 22:46:57 +0000 | [diff] [blame] | 4 | @builtin(instance_index) |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 5 | instance_index : u32; |
James Price | 6b1e5f5 | 2022-01-19 18:11:17 +0000 | [diff] [blame] | 6 | } |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 7 | |
Ben Clayton | 01e4b6f | 2022-01-19 22:46:57 +0000 | [diff] [blame] | 8 | @stage(vertex) |
| 9 | fn main(inputs : VertexInputs) -> @builtin(position) vec4<f32> { |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 10 | let foo : u32 = (inputs.vertex_index + inputs.instance_index); |
| 11 | return vec4<f32>(); |
| 12 | } |