struct VertexOutput { @location(0) color: vec3, @builtin(position) position: vec4 }; struct Locals { transform: mat4x4 }; @group(0) @binding(0) var r_locals: Locals; @vertex fn vs_main( @location(0) position: vec4, @location(1) color: vec3, ) -> VertexOutput { var out: VertexOutput; out.color = color; out.position = r_locals.transform * position; return out; } @fragment fn fs_main(in: VertexOutput) -> @location(0) vec4 { return vec4(in.color.r, in.color.g, in.color.b, 1.0); }