struct Uniforms { modelViewProjectionMatrix : mat4x4, } @binding(0) @group(0) var uniforms : Uniforms; struct VertexInput { @location(0) cur_position : vec4, @location(1) color : vec4, } struct VertexOutput { @location(0) vtxFragColor : vec4, @builtin(position) Position : vec4, } @vertex fn vtx_main(input : VertexInput) -> VertexOutput { var output : VertexOutput; output.Position = (uniforms.modelViewProjectionMatrix * input.cur_position); output.vtxFragColor = input.color; return output; } @fragment fn frag_main(@location(0) fragColor : vec4) -> @location(0) vec4 { return fragColor; }