# vertex const c_scale: f32 = 1.2; [[location(0)]] var a_pos : vec2; [[location(1)]] var a_uv : vec2; [[location(0)]] var v_uv : vec2; [[builtin(position)]] var o_position : vec4; [[stage(vertex)]] fn main() -> void { v_uv = a_uv; o_position = vec4(c_scale * a_pos, 0.0, 1.0); return; } # fragment [[location(0)]] var v_uv : vec2; [[group(0), binding(0)]] var u_texture : texture_sampled_2d; [[group(0), binding(1)]] var u_sampler : sampler; [[location(0)]] var o_color : vec4; [[stage(fragment)]] fn main() -> void { o_color = textureSample(u_texture, u_sampler, v_uv); return; }