struct VertexOut { @builtin(position) position_clip : vec4, @location(0) frag_uv : vec2, } @vertex fn main(@builtin(vertex_index) index : u32) -> VertexOut { var pos = array, 6>( vec2(-1.0, -1.0), vec2( 1.0, -1.0), vec2( 1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, 1.0), vec2(-1.0, -1.0) ); var uv = array, 6>( vec2(0.0, 0.0), vec2(1.0, 0.0), vec2(1.0, 1.0), vec2(1.0, 1.0), vec2(0.0, 1.0), vec2(0.0, 0.0) ); var output : VertexOut; output.position_clip = vec4(pos[index], 0.0, 1.0); output.frag_uv = uv[index]; return output; }