Skip to content

Conversation

@fernandojsg
Copy link
Collaborator

@fernandojsg fernandojsg commented May 25, 2019

WebVR stereo rendering is currently broken on dev because of same changes I introduced on this PR #16367 (sorry 😢)
Basically I was setting the viewport size correctly on https://github.com/mrdoob/three.js/blob/dev/src/renderers/webvr/WebVRManager.js#L72-L81
*please notice that I was using renderWidth as one eye's width and no the whole render width for both eyes, that's why I multiplied by 2 when calling setDrawingBufferSize https://github.com/mrdoob/three.js/blob/dev/src/renderers/webvr/WebVRManager.js#L78

The problem is that if bounds were provided by the WebVR API, updateViewportFromBounds is being called and it's assuming that renderWidth is the whole render size and not just one eye
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webvr/WebVRManager.js#L185-L193

That's why currently everything is rendering in one eye, and half (1/4 actually) for each eye.

  • Tested on Quest, Go and WebVR emulator

@fernandojsg fernandojsg changed the title Fix renderWidth on WebVRManager to specify the whole canvas instead o… Fix WebVR viewport size when presenting May 25, 2019
@mrdoob mrdoob added this to the r105 milestone May 25, 2019
@mrdoob mrdoob merged commit 7fa541c into mrdoob:dev May 25, 2019
@mrdoob
Copy link
Owner

mrdoob commented May 25, 2019

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented May 25, 2019

Thanks @toji too for the ping 🙏

@fernandojsg fernandojsg deleted the fixvr branch May 25, 2019 21:00
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