struct Uniform { pos: vec3, scale: f32, }; @group(0) @binding(0) var in : Uniform; @vertex fn vertex_main( @builtin(vertex_index) VertexIndex : u32 ) -> @builtin(position) vec4 { var positions = array, 3>( vec2( 0.0, 0.1), vec2(-0.1, -0.1), vec2( 0.1, -0.1) ); var pos = positions[VertexIndex]; return vec4((pos*in.scale)+in.pos.xy, 0.0, 1.0); } @fragment fn frag_main() -> @location(0) vec4 { return vec4(1.0, 0.0, 0.0, 0.0); }