playcanvas / playcanvas/engine

feat(graphics): adopt WGSL sized_binding_array once Chrome ships it unflagged

Open
#8,792 0 comments 1 reaction 1 assignee View on GitHub

@mvaligursky is already working on this.

Since May 27, 2026.

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

Description

Background

The sized_binding_array WGSL proposal adds a binding_array<T, N> type that supports dynamic indexing across an array of bindings — closing one of the major WebGL → WebGPU porting gaps, and enabling bindless-style patterns for textures, samplers, and buffers.

Example:

```wgsl
@group(0) @binding(0) var textures: binding_array<texture_2d, 8>;
@group(0) @binding(1) var samp: sampler;

@fragment
fn fs(in: VsOut) -> @location(0) vec4f {
let idx = in.materialIndex;
return textureSample(textures[idx], samp, in.uv);
}
```

Status

As of Chrome 148 (May 2026 investigation), the feature appears to still be behind flags / not exposed via navigator.gpu.wgslLanguageFeatures as a stable entry. This issue is a placeholder — do not act on it until Chrome ships it unflagged.

What to do when it ships

  1. Add the standard WGSL feature cap infrastructure (supportsSizedBindingArray, CAPS_SIZED_BINDING_ARRAY, requires sized_binding_array;) — same shape as #8785, #8786, #8787.
  2. Evaluate use cases: candidate consumers in the engine include material variants (texture atlas/array indirection), gsplat tile lookups, IBL chains, anything currently working around fixed binding slots with branching or duplicated shaders.
  3. Consider adding a BindGroupFormat API extension for declaring binding arrays on the JS side.

Triggers to revisit

  • Chrome release notes announce sized_binding_array is on by default (no flags)
  • navigator.gpu.wgslLanguageFeatures.has('sized_binding_array') returns true in stable Chrome

References

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.