struct LookParams { m: mat4x4f, } struct Vertex { @location(0) pos: vec3f, @location(1) color: vec3f, } struct Varying { @builtin(position) screen: vec4f, @location(0) color: vec4f, } @group(0) @binding(0) var look: LookParams; @vertex fn on_vertex(in: Vertex) -> Varying { let pos = look.m * vec4f(in.pos, 1.0); let color = vec4f(in.color, 1.0); return Varying(pos, color); } @fragment fn on_fragment(in: Varying) -> @location(0) vec4f { return in.color; }