texture_and_sampler_let
WGSL language feature
Specification: WGSL § texture_and_sampler_let
Check navigator.gpu?.wgslLanguageFeatures?.has('texture_and_sampler_let')
before choosing a shader that uses this language feature. It is available automatically
when supported; requires texture_and_sampler_let; documents the dependency
and rejects the shader on unsupported implementations. This language token is not a
requiredFeatures entry for requestDevice(); any additional
device requirements are described below.
This language extension allows a let declaration to hold a texture or sampler value. A function can give a bound resource a local alias, such as let source = inputTexture;, and use that alias in texture operations.
This is useful in generated shaders and material code where an intermediate name makes resource use clearer. A texture or sampler value is a handle to a resource: assigning it to a local name does not duplicate texels, allocate a new texture, or create another bind-group entry.
It does not make textures and samplers general-purpose numeric data or permit arbitrary mutable resource variables and resource arrays. Normal resource types and binding requirements still apply. Without the extension, refer to the original binding directly or pass the resource through a supported texture or sampler function parameter.
Availability by month
| Month | With feature | Eligible reports | Availability |
|---|---|---|---|
| 2026-08 | 69 | 106 | 65.1% |
| 2026-09 | 26 | 36 | 72.2% |
By browser (last 30 days)
| Browser | Availability | n |
|---|---|---|
| chrome | 96.7% | 90 |
| edge | 100.0% | 8 |
| firefox | 0.0% | 44 |
Availability = share of first-party, non-quarantined reports with WebGPU on a hardware
(non-fallback) adapter
whose browser reports this token in navigator.gpu.wgslLanguageFeatures.
This measures language support in the browser, not a GPU hardware capability.
Developer-leaning sample.
Full methodology.