struct VertexOutput { @builtin(position) clip_position: vec4 } @vertex fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> VertexOutput { var out: VertexOutput; let x = (1.0 * f32(in_vertex_index % u32(2))) + -0.5; let y = (1.0 * f32(in_vertex_index / u32(2))) + -0.5; out.clip_position = vec4(x, y, 0.0, 1.0); return out; } @fragment fn fs_main(in: VertexOutput) -> @location(0) vec4 { return vec4(1.0, 1.0, 1.0, 0.0); }