struct VertexOutput { @builtin(position) position: vec4, @location(0) tex_coord: vec2, } @group(0) @binding(0) var texture: texture_2d; @group(0) @binding(1) var texture_sampler: sampler; @fragment fn fs_main(input: VertexOutput) -> @location(0) vec4 { var text_color = textureSample(texture, texture_sampler, vec2(input.tex_coord.x, input.tex_coord.y)).r; return vec4(text_color * vec3(1., 1., 1.), text_color); }