struct UniformData { view : mat4x4, projection : mat4x4, model : array, 25>, } @group(0) @binding(0) var mvp: UniformData; struct VertexOutput { @builtin(position) position : vec4, @location(0) color : vec3, } @vertex fn main( @builtin(instance_index) instance_idx : u32, @location(0) position : vec3, @location(1) color : vec3 ) -> VertexOutput { var output: VertexOutput; output.position = mvp.projection * mvp.view * mvp.model[instance_idx] * vec4(position, 1.0); output.color = color; return output; }