-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix bug where glow layer is recreated every frame under NullEngine #16908
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
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/16908/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16908/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/16908/merge#BCU1XR#0 |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU |
Only one formatting issue to go |
@djn24 my guess is should have space after { and before } |
Head branch was pushed to by a user without write access
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
@djn24 this should also be on one line |
Thanks. I've just found what I think is the right command to run prettier, so hopefully this will pass this time. |
Visualization tests for WebGPU |
WebGL2 visualization test reporter: |
The render() method in effectLayer.ts checks whether the current main texture size matches the desired size; it disposes and recreates it if it doesn't. Unfortunately when running with the null engine, the size of the created texture is always zero (whatever size arguments are passed into its constructor) so it never matches the desired size and is thus recreated every time.
Changing things such that textures return their intended size when running under the null engine seemed like quite an invasive and risky change, so my fix just changes effectLayer.ts to remember the size it asked for and check against that rather than the reported size of the texture.