@group(0) @binding(0) var tex_sampler: sampler; @group(0) @binding(1) var font_tex: texture_2d; struct VertexOutput { @builtin(position) position: vec4, @location(0) uv: vec2, } @vertex fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> VertexOutput { let uv = vec2(f32((in_vertex_index << 1) & 2), f32(in_vertex_index & 2)) / 2.0; var out: VertexOutput; out.position = vec4(uv.x - 0.5, uv.y - 0.5, 0.0, 1.0); out.uv = uv; return out; } @fragment fn fs_main(in: VertexOutput) -> @location(0) vec4 { return vec4(1.0, 1.0, 1.0, textureSample(font_tex, tex_sampler, in.uv).r); }