Skip to content

add WebGPU XR optimization#8732

Draft
cabanier wants to merge 1 commit into
playcanvas:mainfrom
cabanier:webgpu_webxr_patches
Draft

add WebGPU XR optimization#8732
cabanier wants to merge 1 commit into
playcanvas:mainfrom
cabanier:webgpu_webxr_patches

Conversation

@cabanier
Copy link
Copy Markdown

@cabanier cabanier commented May 15, 2026

  • Add native WebGPU XR view-instanced rendering when projection-layer sub-images share a texture array. The WebGPU XR bridge now detects compatible layered sub-images, records the view-count state on the device, and drives FramePassMultiView through a single native pass when supported.
  • Request and expose the WebGPU view-instancing and multisampled-array-textures capabilities, including maxViewInstanceCount handling. Backbuffer render-target setup now allocates array-layered color/depth attachments for native view-instanced XR, including multisampled texture-array attachments when needed.
  • Teach WGSL processing and bind group layout generation about multisampled 2D array textures, native view-index handling, and view-uniform arrays. Materials and mesh shader caching now include the view-instancing shader variant so XR array uniforms select the correct per-view matrices and camera data.

@mvaligursky
Copy link
Copy Markdown
Contributor

Amazing, I'll look into details next week, thanks so much!

@mvaligursky
Copy link
Copy Markdown
Contributor

I think we should move the built-ins / clustered lighting changes to a separate PRs, as those are pretty much read to be merged. I'll do it next week, unless you do before then. Great changes overall. Any idea where we might get those other multi-view / multi-sampled arrays extensions?

@cabanier
Copy link
Copy Markdown
Author

I can move those to their own separate PR.

@cabanier
Copy link
Copy Markdown
Author

They will land as experimental features in the next 2 releases of Quest Browser. As soon as the proposals are merged, I will ship them by default.

Add native WebGPU XR view-instanced rendering when projection-layer sub-images share a texture array. The WebGPU XR bridge now detects compatible layered sub-images, records the view-count state on the device, and drives FramePassMultiView through a single native pass when supported.

Request and expose the WebGPU view-instancing and multisampled-array-textures capabilities, including maxViewInstanceCount handling. Backbuffer render-target setup now allocates array-layered color/depth attachments for native view-instanced XR, including multisampled texture-array attachments when needed.

Teach WGSL processing and bind group layout generation about multisampled 2D array textures, native view-index handling, and view-uniform arrays. Materials and mesh shader caching now include the view-instancing shader variant so XR array uniforms select the correct per-view matrices and camera data.
@cabanier cabanier force-pushed the webgpu_webxr_patches branch from 00cb5b4 to 9fe3f8c Compare May 15, 2026 19:56
@cabanier
Copy link
Copy Markdown
Author

cabanier commented May 15, 2026

@mvaligursky done. I moved the optimization to a different patch. I'll keep this one as "draft"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants