Skip to content

[WebGPU-XR][Phase 2] WebGPU projection layer + render target provider #18640

Description

@RaananW

Part of #18635. Depends on Phase 1.

Phase 2 — WebGPU projection layer + render target provider

Implement the core WebGPU rendering path: render the stereo scene into the projection layer's per-view GPUTextures.

Scope

  • Add a WebXRGPUProjectionLayer render-target provider: on each getViewSubImage(layer, view), wrap subImage.colorTexture (and depthStencilTexture when present) via AbstractEngine.wrapWebGPUTexture into an InternalTextureRenderTargetTexture, applying getViewDescriptor() and viewport.
  • Verify the WebGPU engine renders into the externally-provided color+depth GPUTexture per eye (bindFramebuffer/RTT path), rather than the canvas swapchain (getCurrentTexture() must not be used in XR).
  • Handle MSAA resolve and per-view texture-view descriptors; wire viewport per eye.

Acceptance

  • Correct stereo rendering on Quest Browser with WebGPU (manual verification).
  • No regression to non-XR WebGPU rendering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions