playcanvas / playcanvas/engine

Add support for WebGPU texture component swizzle

Open
#8,859 0 comments 0 reactions 1 assignee View on GitHub

@mvaligursky is already working on this.

Since Jun 8, 2026.

area: graphics enhancement
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Feature

Add support for texture component swizzle, shipped in Chrome 143.

This allows rearranging or replacing a texture's RGBA channels at access time via a swizzle specification (each output channel mapped from r/g/b/a/0/1), configured on the texture view. The engine does not currently expose or apply component swizzles.

Benefit
  • Adapt source texture channel layouts (e.g. BGRA vs RGBA, single-channel broadcast, fixed 0/1 channels) without extra shader code or format conversions.
  • Simplifies handling of imported/compressed textures whose channel order differs from what shaders expect.
Notes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.