-
Notifications
You must be signed in to change notification settings - Fork 3.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
Viewer auto suspend rendering when scene is idle #15864
base: master
Are you sure you want to change the base?
Viewer auto suspend rendering when scene is idle #15864
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15864/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/15864/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/15864/merge#BCU1XR#0 |
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
If it's of any help regarding the camera movement, I've had a similar issues with camera implementations previously (non-Babylon) when trying to achieve the same thing (render only on change), and the culprit was using lerp/mix functions. |
I did some tests with WebGPU but I couldn't reproduce problem #2. I'll try again later, after I've done a PR to fix the morph problems I'm experiencing by testing the |
This pull request has been marked as stale because it has been inactive for more than 14 days. Please update to "unstale". |
Should we keep it or do we expect it to stay stale |
I plan to come back to this, hopefully soon. I was waiting on some fixes from Alexis which he recently was able to complete. |
Potential repro on point 2: errors on window resize. Chrome 131.0.6778.266 https://codepen.io/j-te/pen/pvzOgqx. from: https://forum.babylonjs.com/t/viewer-v2-render-considerations/56024/4?u=j-te |
This PR adds support for suspending rendering when the scene is idle (e.g. nothing is changing from frame to frame, and the same exact pixels would be rendered repeatedly). The idea is to reduce resource pressure and not destroy the battery on a mobile device.
I have two problems remaining for this PR:
y
value of the position has a difference of .000000000001). This makes_isSynchronizedProjectionMatrix
return true every frame. I don't think this has anything to do with my PR, I think this is a pre-existing bug that we just don't notice. Since it is hard to repro, I haven't been able to figure out what causes it yet.After merging master, I'm no longer able to repro the first of the above issues. I can still repro the second issue, especially with complex models.