← Back to release summary

WebGPU: Texture component swizzle

Category
Graphics
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Functionality added to the WebGPU spec after its first shipment in a browser. Allows GPUTextureViews to rearrange or replace the color components from texture's red/green/blue/alpha channels when accessed by a shader.

Motivation

The texture component swizzle optional feature allows for efficient, flexible, and robust texture sampling in WebGPU, enabling developers to optimize performance, correct component ordering mismatches, and reuse shader code across various texture formats. https://github.com/gpuweb/gpuweb/pull/5361

Standards & signals

Explainers: https://github.com/gpuweb/gpuweb/blob/main/proposals/texture-component-swizzle.md

View on chromestatus.com