API

Interface XrGpuSubImage

A per-view sub-image of an XR layer: the WebGPU textures (and viewport) the app renders one eye into for the current frame. Mirrors the draft XRGPUSubImage; extends the shipped XRSubImage (which supplies viewport).

interface XrGpuSubImage {
    colorTexture: GPUTexture;
    depthStencilTexture: GPUTexture | null;
    motionVectorTexture: GPUTexture | null;
    getViewDescriptor(): GPUTextureViewDescriptor;
}

Hierarchy

  • XRSubImage
    • XrGpuSubImage
Index
colorTexture: GPUTexture

Color texture to render the view into.

depthStencilTexture: GPUTexture | null

Depth/stencil texture, or null when the layer has no depth attachment.

motionVectorTexture: GPUTexture | null

Motion-vector texture for space-warp reprojection, when supported.