Skip to content

fix(xr): disable post-processing while presenting#174

Merged
ecto merged 1 commit intomainfrom
xr-fix-postprocess-black
May 3, 2026
Merged

fix(xr): disable post-processing while presenting#174
ecto merged 1 commit intomainfrom
xr-fix-postprocess-black

Conversation

@ecto
Copy link
Copy Markdown
Owner

@ecto ecto commented May 3, 2026

Summary

EffectComposer (N8AO + Vignette) renders to an offscreen target and blits to the canvas. That blit doesn't write into the WebXR layer's framebuffer, so during an immersive-vr / immersive-ar session the scene goes black and only objects rendered directly by WebXRManager (hands, controllers) appear.

This PR skips the EffectComposer blocks in ViewportContent.tsx when xrPresenting is true. Outside XR the post-processing is unchanged.

Why

Reported symptom from a real headset right after #173 landed: "when you enter VR, it's just all black except for your hands." That's the textbook signature of an offscreen-target post-processing pipeline running over the XR framebuffer.

Test plan

  • Enter VR / AR on a real headset — scene geometry, environment lighting, and grid all render normally; hands still visible.
  • Exit XR — N8AO + Vignette come back on the desktop view (visually identical to before).

EffectComposer (N8AO + Vignette) renders to an offscreen target and
blits to the canvas — that path doesn't write into the XR layer's
framebuffer, so during a WebXR session the scene goes black and only
objects rendered directly by WebXRManager (hands, controllers) show.
That's the "all black except your hands" symptom in immersive-vr.

Skip the EffectComposer when `xrPresenting` is true. Outside XR the
post-processing is unchanged.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mecheval Ready Ready Preview, Comment May 3, 2026 2:40pm
vcad Ready Ready Preview, Comment May 3, 2026 2:40pm
vcad-docs Ready Ready Preview, Comment May 3, 2026 2:40pm
vcad-mcp Ready Ready Preview, Comment May 3, 2026 2:40pm

Request Review

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.

1 participant