Skip to content

Added support for ignoreDepthValues to XRWebGLBinding #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added support for ignoreDepthValues to XRWebGLBinding
  • Loading branch information
cabanier committed Nov 1, 2021
commit 74e2662bbf8f501df4c2e84a4be95b3b646f5fe0
8 changes: 7 additions & 1 deletion webxrlayers-1.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ The {{XRWebGLBinding}} object is used to create layers that have a GPU backend.
constructor(XRSession session, XRWebGLRenderingContext context);

readonly attribute double nativeProjectionScaleFactor;
readonly attribute boolean usesDepthValues;

XRProjectionLayer createProjectionLayer(optional XRProjectionLayerInit init = {});
XRQuadLayer createQuadLayer(optional XRQuadLayerInit init = {});
Expand Down Expand Up @@ -1087,11 +1088,16 @@ MUST perform the following steps when invoked:

</div>

The {{nativeProjectionScaleFactor}} function returns the value that the |session|'s [=recommended WebGL framebuffer resolution=]
The <dfn attribute for="XRWebGLBinding">nativeProjectionScaleFactor</dfn> function returns the value that the |session|'s [=recommended WebGL framebuffer resolution=]
MUST be multiplied by to yield the |session|'s [=native WebGL framebuffer resolution=].

ISSUE: special case UA behavior if the size causes the layout to change (ie if the requested width exceeds a limit with {{XRLayerLayout/"stereo-left-right"}})

The <dfn attribute for="XRWebGLBinding">usesDepthValues</dfn> attribute, if <code>false</code>, indicates that the
[=XR Compositor=] MUST NOT make use of values if there is a depth buffer attachment. When the attribute
is <code>true</code> it indicates that the content of the depth buffer attachment will be used by the
[=XR Compositor=] and is expected to be representative of the scene rendered into the layer.

<div class="algorithm" data-algorithm="determine the layout attribute">

To <dfn>determine the layout attribute</dfn> using an {{XRTextureType}} |textureType|, an {{XRWebGLRenderingContext}} |context| and an {{XRLayerLayout}} |layout|, the user agent MUST run the following steps:
Expand Down