Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions src/renderers/common/XRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,9 @@ class XRManager extends EventDispatcher {
type: UnsignedByteType,
colorSpace: renderer.outputColorSpace,
depthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ),
stencilBuffer: renderer.stencil
stencilBuffer: renderer.stencil,
resolveDepthBuffer: ( glProjLayer.ignoreDepthValues === false ),
resolveStencilBuffer: ( glProjLayer.ignoreDepthValues === false ),
} );

this._xrRenderTarget.hasExternalTextures = true;
Expand Down Expand Up @@ -651,7 +653,9 @@ class XRManager extends EventDispatcher {
format: RGBAFormat,
type: UnsignedByteType,
colorSpace: renderer.outputColorSpace,
stencilBuffer: renderer.stencil
stencilBuffer: renderer.stencil,
resolveDepthBuffer: ( glBaseLayer.ignoreDepthValues === false ),
Copy link
Collaborator

@Mugen87 Mugen87 Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WebGL 2 (and WebGPU) backend of WebGPURenderer does not yet honor the resolve* flags. That needs to be fixed with a different PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. The XR part is also using ignoreDepthValues to not pass the depth buffer and use that as a signal to ignore it in the renderer. That should also be updated.

resolveStencilBuffer: ( glBaseLayer.ignoreDepthValues === false ),
}
);

Expand Down
8 changes: 6 additions & 2 deletions src/renderers/webxr/WebXRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ class WebXRManager extends EventDispatcher {
format: RGBAFormat,
type: UnsignedByteType,
colorSpace: renderer.outputColorSpace,
stencilBuffer: attributes.stencil
stencilBuffer: attributes.stencil,
resolveDepthBuffer: ( glBaseLayer.ignoreDepthValues === false ),
resolveStencilBuffer: ( glBaseLayer.ignoreDepthValues === false )

}
);

Expand Down Expand Up @@ -346,7 +349,8 @@ class WebXRManager extends EventDispatcher {
stencilBuffer: attributes.stencil,
colorSpace: renderer.outputColorSpace,
samples: attributes.antialias ? 4 : 0,
resolveDepthBuffer: ( glProjLayer.ignoreDepthValues === false )
resolveDepthBuffer: ( glProjLayer.ignoreDepthValues === false ),
resolveStencilBuffer: ( glProjLayer.ignoreDepthValues === false )
} );

}
Expand Down
Loading