struct Uniforms { viewProj : mat4x4, } @group(0) @binding(0) var uniforms : Uniforms; struct VertexInput { @location(0) position : vec3, @location(1) color : vec3, } struct VertexOutput { @builtin(position) position : vec4, @location(0) color : vec3, } @vertex fn vs_main(in : VertexInput) -> VertexOutput { var out : VertexOutput; out.position = uniforms.viewProj * vec4(in.position, 1.0); out.color = in.color; return out; } @fragment fn fs_main(in : VertexOutput) -> @location(0) vec4 { return vec4(in.color, 1.0); }