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

fix: set foveation on session reset #235

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

saitonakamura
Copy link
Collaborator

setSession currently reset foveation to 1 https://github.com/mrdoob/three.js/blob/b83bab0b213a0beb7643134021e1e693f1381dcf/src/renderers/webxr/WebXRManager.js#L331 so setFoveation needs to happen after it to work

@CodyJasonBennett CodyJasonBennett changed the title fixed foveation set fix: set foveation on session reset Jan 13, 2023
@CodyJasonBennett CodyJasonBennett merged commit 138e48e into pmndrs:master Jan 13, 2023
saitonakamura added a commit to mayflower-tech/three.js that referenced this pull request Jan 13, 2023
Currently foveation is set to 1.0 on setSession,
and there's no way to set it before,
because it's not saved anywere when session is not active.
So the only way to set it to a non-default value is to call setSession and
call setFoveation afterwards.
That leads to hacks in certain scenarios like pmndrs/xr#235.
This PR allows setting it beforehand, while being backwards compatible
@saitonakamura
Copy link
Collaborator Author

we may not need it after https://github.com/mrdoob/three.js/pull/25282/files

@saitonakamura saitonakamura deleted the fix-foveation-set branch January 13, 2023 15:16
Mugen87 pushed a commit to mrdoob/three.js that referenced this pull request Jan 25, 2023
Currently foveation is set to 1.0 on setSession,
and there's no way to set it before,
because it's not saved anywere when session is not active.
So the only way to set it to a non-default value is to call setSession and
call setFoveation afterwards.
That leads to hacks in certain scenarios like pmndrs/xr#235.
This PR allows setting it beforehand, while being backwards compatible
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