texture-component-swizzle
Specification: WebGPU § texture-component-swizzle
After requesting this feature, set swizzle in GPUTextureViewDescriptor to a four-character string built from r, g, b, a, 0, and 1. For example, "bgra" exchanges red and blue, while "rrr1" presents the red channel as grayscale with opaque alpha. The default is "rgba".
View-level remapping is useful for imported assets, single-channel masks, and rendering systems that expect a consistent channel arrangement. Several views can interpret the same texture differently without rewriting its texels or creating converted copies.
The remapping applies when the view is used as a texture binding for shader reads. It does not rewrite the underlying storage or provide a general channel conversion for copies, storage-texture writes, or render attachments. Without the feature, sample the normal view and rearrange the returned vector in WGSL; constants can supply missing channels there too.
Availability by month
| Month | With feature | Eligible reports | Availability |
|---|---|---|---|
| 2026-08 | 70 | 106 | 66.0% |
| 2026-09 | 26 | 36 | 72.2% |
By browser (last 30 days)
| Browser | Availability | n |
|---|---|---|
| chrome | 97.8% | 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 that expose this feature. Developer-leaning sample. Full methodology.