Skip to content

XRGPUBinding Projection-Layer scale factor causing cut off #228

@Schlabbermampf

Description

@Schlabbermampf

In the WebGPU AR example: https://immersive-web.github.io/webxr-samples/webgpu/ar-barebones.html I put scaleFactor: 0.5 into the parameters of XRGpuBinding.createProjectionLayer().

This causes the content to be drawn with half width and height (top-left quarter of the screen).

According to this WebGL docs, "Projection layers fill the observer's entire view" though (https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLBinding/createProjectionLayer).

within my C++ code the problem persists when i just clear the screen with opaque-black (no proj-matrix in use). Trying to force the viewport to be match the actual screen-size by using wgpuRenderPassEncoderSetViewport() does stretch the drawn content, but it is still cut-off to half the screen (top-left quarter of the screen).

Isn't the Projection-Layer meant to always be full-screen, or is there another way to show a down-scaled Projection-Layer to be full-screen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions