struct VertexOutput { @builtin(position) position: vec4, @location(0) color: vec4, }; @vertex fn vs_main( @location(0) position: vec2, @location(1) color: vec4, ) -> VertexOutput { var result: VertexOutput; result.position = vec4(position, 0.0, 1.0); result.color = color; return result; } @fragment fn fs_main(vertex: VertexOutput) -> @location(0) vec4 { return vertex.color.abgr; }