question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MeshPhysicalMaterial transmission doesn't work correctly in WebXR immersive mode

See original GitHub issue

Describe the bug

We improved MeshPhysicalMaterial transmission support in #21884. But transmission doesn’t work correctly in WebXR immersive mode yet.

For transmissive objects, we use multi passes. First we render opaque objects to a render target and then render transmissive objects with the render target.

The problem in VR immersive mode is the current transmission shader code doesn’t expect stereoscopic vision so the calculated coordinates in the shader for the render target will be wrong.

The problem in AR immersive mode is we render the objects on camera but the camera isn’t rendered to the render target so the transmissive objects can’t be transparent to the camera (especially transparent = false MeshPhysicalMaterial).

To Reproduce

Steps to reproduce the behavior:

  1. Go to edit a WebXR examples to use MeshPhysicalMaterial with transmission = 1
  2. Open the example
  3. Enter immersive mode
  4. See the transmission doesn’t work correctly

Expected behavior

transmission works correctly even in WebXR immersive mode A clear and concise description of what you expected to happen.

Screenshots

image

Platform:

  • Device: Any WebXR devices
  • OS: Any
  • Browser: Any
  • Three.js version: dev

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Aug 26, 2021

#22426 fixed VR and #22425 kind of fixed AR

0reactions
mrdoobcommented, Aug 26, 2021

@mrdoob What do you think of this temporal workaround?

I’ve just tried it and it doesn’t seem to produce good results…

Screen Shot 2021-08-26 at 9 32 51 AM
Read more comments on GitHub >

github_iconTop Results From Across the Web

Transmission | MeshPhysicalMaterial | does not work
transmission property does not work in MeshPhysicalMaterial. Console does not have errors but one warning: three.module.js:8827 THREE.
Read more >
immersive-ar samples not working · Issue #61 - GitHub
Using Huawei P20 I can't run any of the immersive-ar samples. ... AR samples does not work there either, but it behaves differently....
Read more >
WebXR permissions and security - Web APIs | MDN
First, any requests to activate the immersive-vr mode are rejected if the domain issuing the request does not have permission to enable an ......
Read more >
Rendering immersive web experiences with Three.JS ... - 01.org
This article is part of a series about creating responsive VR experiences: Part 1: VR concepts and the immersive web; Part 2: Rendering ......
Read more >
Is SceneOptimizer compatible with XR? - Questions - Babylon.js
I'm trying to use SceneOptimizer in WebXR Immersive Mode, but not having success. Are they intended to be compatible?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found