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

UniformsUtils: Check for XRRenderTarget in getUnlitUniformColorSpace #27869

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Mar 4, 2024

Fixed #27868

Description

Adds a check to getUnlitUniformColorSpace to return the render target's texture colour space in case of the WebXR render target. With this change both fog colour and background colour remain consistent inside and outside VR sessions. This is similar to the logic in WebGLProgams.js and WebGLRenderer.js.

This contribution is funded by Fern Solutions

Copy link

github-actions bot commented Mar 4, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
669.5 kB (166.1 kB) 669.6 kB (166.2 kB) +55 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
449.7 kB (108.8 kB) 449.8 kB (108.8 kB) +55 B

@Mugen87 Mugen87 added this to the r163 milestone Mar 4, 2024
@donmccurdy
Copy link
Collaborator

Note — I don't have access to a WebXR-compatible device at the moment. Could someone test that background and fog colors work as expected in a WebXR session before this is merged?

@mrxz
Copy link
Contributor Author

mrxz commented Mar 6, 2024

@donmccurdy Here are some screenshots taken with a Meta Quest 3 on a test scene.

Outside WebXR In WebXR Session
Without this PR image image
With this PR image image

@Mugen87 Mugen87 merged commit 99d87b9 into mrdoob:dev Mar 6, 2024
12 checks passed
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.

WebXR: Scene fog and background appear darker in VR
3 participants