Skip to content
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

WebXRManager: Mark XR rendertarget as needing a resolve for depth or stencil. #30565

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

cabanier
Copy link
Contributor

This change will indicate if the depth and stencil buffer should be preserved and passed to the XR Compositor.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.51
78.38
336.65
78.39
+136 B
+13 B
WebGPU 521.78
144.83
521.96
144.85
+180 B
+23 B
WebGPU Nodes 521.25
144.72
521.43
144.75
+180 B
+24 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.51
112.23
465.64
112.24
+136 B
+13 B
WebGPU 592.15
160.44
592.33
160.47
+180 B
+26 B
WebGPU Nodes 547.28
149.88
547.47
149.91
+180 B
+26 B

@mrdoob mrdoob added this to the r174 milestone Feb 20, 2025
@Mugen87 Mugen87 merged commit 16a467f into mrdoob:dev Feb 20, 2025
12 checks passed
@@ -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.

@Mugen87 Mugen87 changed the title Mark XR rendertarget as needing a resolve for depth or stencil WebXRManager: Mark XR rendertarget as needing a resolve for depth or stencil. Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants