struct VertexOutput { [[location(0)]] tex_coord: vec2; [[builtin(position)]] position: vec4; }; [[group(0), binding(1)]] var r_color: texture_2d; [[stage(fragment)]] fn fs_main(in: VertexOutput) -> [[location(0)]] vec4 { let tex = textureLoad(r_color, vec2(in.tex_coord * 256.0), 0); let v = f32(tex.x) / 255.0; return vec4(1.0 - (v * 5.0), 1.0 - (v * 15.0), 1.0 - (v * 50.0), 1.0); }