-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Refactored render loop and fix transmission in VR #22426
Conversation
Were you able to make any optimizations to per-object render state setup costs, or does this just roll back the performance gain from my previous change? |
It's an evolution of what you did. Even less camera changes. Before your PR the logic was:
|
I'll push the builds temporarily so we can test this easily. |
@davehill00 Any chance you can try this a bit? I do not have my Quest this week. Edit: Would be good to test that, say, this example has not regressed in performance/calls: Old: https://raw.githack.com/mrdoob/three.js/r131/examples/#webxr_vr_cubes |
Yep, should be able to take a look sometime this week. |
link tested on my quest 2: transmission looks fine now in VR. For performance should compare more in depth |
Hmm... I think I'll merge this for r132 and revert and release a point release if something goes wrong 🤞 |
This reverts commit c5e295f.
Finally got around to testing this on Quest 2 (got sidelined by the bundler issue). Draw call perf looks comparable to the what we landed in r131. 👍 |
Sweet! Thanks! |
Before mrdoob#22426, when not using array camera, the background doesn't participate in layer calculation. We feel the old behaviour is better because we don't need to always add layer `0` to the camera when doing multipass rendering. This commit enables all layer for the background. Note that the behaviour is still slightly different from r115: When the camera's layer **mask** is set to 0, r115 will render background and now won't.
Before mrdoob#22426, when not using array camera, the background doesn't participate in layer calculation. We feel the old behaviour is better because we don't need to always add layer `0` to the camera when doing multipass rendering. This commit enables all layer for the background. Note that the behaviour is still slightly different from r115: When the camera's layer **mask** is set to 0, r115 will render background and now won't.
Related issue: #21911
Description
Live link: https://raw.githack.com/mrdoob/three.js/dev/examples/#webxr_vr_sandbox
In order to get transmission working in VR I had to refactor the render loop following what @davehill00 did in #22123.
Before this PR the logic was:
After this PR the logic is:
/cc @takahirox @davehill00