-
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
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: |
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 |
…antrem/Babylon.js into ryantrem-viewer-idle-suspend-rendering
Add debug logs
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
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 |
WebGL2 visualization test reporter: |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
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:
Sometimes (it's hard to repro) I can get into a state where the camera position jumps back and forth between two very close positions (like they
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.Very rarely I get an error related to WebGPU snapshot rendering mode where it thinks the gpu bundle is out of date, and then nothing renders (so rare, but catastrophic). I don't know why this happens, but I'm guessing some kind of timing issue.Edit: 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.
Edit: After bringing in fixes from @Popov72, the first issue appears to be fixed.