demo · v146
Binding tagger playground
WGSL lets you declare texture and sampler bindings as let values, not just globals. This editor takes a fragment of WGSL with bind-group bindings, runs a quick lint pass, and counts the duplicated bind-slot declarations the new syntax lets you remove.
scenario
your WGSL
pre-146 (legacy)
146 — texture/sampler lets
0binding declarations
0declarations saved
0lines saved
// 146 adds binding-let:
@group(0) @binding(0) var atlas: texture_2d<f32>;
@group(0) @binding(1) var samp: sampler;
fn rgba(uv: vec2<f32>) -> vec4<f32> {
let tex = atlas; // local alias — no extra binding slot
return textureSample(tex, samp, uv);
}