-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Description
Description of the problem
Three.js currently has the following check to see if it should render a background:
three.js/src/renderers/webgl/WebGLBackground.js
Lines 36 to 40 in 617ea9a
| if ( session && session.environmentBlendMode === 'additive' ) { | |
| background = null; | |
| } |
environmentBlendMode is not an indication of the session mode, the session mode used at creation should be held on to (perhaps by creating a .mode field on the XRSession) if we want this check.
Now, if we switch the check to be xr.mode == "immrsive-ar", this will stop rendering the background on opaque-display VR devices that claim to support AR mode. This seems ... okay to me; as far as I understand it no browser has made this choice yet, but if it were to it would likely be to make it possible to tsst out AR-specific content on VR devices, in which case we should probably have things render as close to that as possible.
If we do want to render the background even on opaque-display VR displays claiming to be AR, this check should instead check for either "additive" or "alpha-blend" blend modes
Three.js version
- Dev
- r116
- ...
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS