-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: |
this._details.scene.incrementRenderId(); | ||
this._details.scene.executeWhenReady(() => { | ||
this._sceneMutated = true; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should set the second parameter of executeWhenReady
to true
, to ensure that additional render targets (if any) are also ready. I think we should also make this change in the snapshot rendering helper, as we use executeWhenReady
twice in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we expect additional render targets in the constrained case of the Viewer? Or would that require a user to do more advanced things, directly modifying the Babylon scene?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be some for shadows or diffuse_transmission in gltf for instance.
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
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.For now, I will put this PR in draft.