Skip to content

WebGPURenderer: Fix XR shadows#34088

Merged
Mugen87 merged 2 commits into
mrdoob:devfrom
cabanier:webxr_shadow_transmission
Jul 24, 2026
Merged

WebGPURenderer: Fix XR shadows#34088
Mugen87 merged 2 commits into
mrdoob:devfrom
cabanier:webxr_shadow_transmission

Conversation

@cabanier

@cabanier cabanier commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Keep XR camera substitution limited to the output target so offscreen shadow passes retain their own cameras, and tolerate a missing postprocessing target during XR setup.

Tested with both WebGPU and the WebGL fallback.

This contribution is funded by Meta

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.88
86.71
365.88
86.71
+0 B
+0 B
WebGPU 683.22
189.02
683.33
189.09
+112 B
+67 B
WebGPU Nodes 681.21
188.7
681.32
188.76
+112 B
+66 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 510.55
124.02
510.55
124.02
+0 B
+0 B
WebGPU 761.59
205.07
761.7
205.15
+112 B
+70 B
WebGPU Nodes 711.09
192.5
711.2
192.56
+112 B
+65 B

@cabanier
cabanier force-pushed the webxr_shadow_transmission branch from d759d8e to d57884a Compare July 21, 2026 22:59

@cabanier cabanier left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cabanier

Copy link
Copy Markdown
Contributor Author

@Mugen87 if you prefer, I can split this in 2 PRs

@Mugen87

Mugen87 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

That would be great!

Use the XR camera only for the output render target so offscreen shadow passes retain their light cameras.

Guard XR foveation setup when no post-processing render target is required.
@cabanier
cabanier force-pushed the webxr_shadow_transmission branch from d57884a to e2b9825 Compare July 23, 2026 16:27
@cabanier cabanier changed the title WebGPURenderer: Fix XR shadows and transmission WebGPURenderer: Fix XR shadows Jul 23, 2026
@cabanier

Copy link
Copy Markdown
Contributor Author

That would be great!

done

@cabanier
cabanier marked this pull request as ready for review July 23, 2026 16:28
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

🖼️ E2E screenshot tests

✅ All examples render correctly again (run).

@cabanier
cabanier marked this pull request as draft July 23, 2026 16:55
@cabanier
cabanier marked this pull request as ready for review July 23, 2026 17:11
@cabanier

This comment was marked as resolved.

Comment thread src/renderers/common/Renderer.js Outdated
Comment thread src/renderers/common/Renderer.js Outdated
@Mugen87

Mugen87 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

I've directly updated the branch with my feedback. Are you okay with the latest updates?

@Mugen87 Mugen87 added this to the r186 milestone Jul 24, 2026
@cabanier

Copy link
Copy Markdown
Contributor Author

I've directly updated the branch with my feedback. Are you okay with the latest updates?

yes!

@Mugen87
Mugen87 merged commit db1daf1 into mrdoob:dev Jul 24, 2026
10 checks passed
@cabanier
cabanier deleted the webxr_shadow_transmission branch July 24, 2026 15:58
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.

2 participants