Fix SMAA resources not being cleaned up#22985
Fix SMAA resources not being cleaned up#22985alice-i-cecile merged 2 commits intobevyengine:mainfrom
Conversation
|
This is in draft until someone confirms that it actually solves the problem. |
|
This fixes it for me. |
|
This should work, but it feels like the introduction of a new pattern that needs more ECS discussion It's a form of linked components that must be removed together I would prefer to fix this directly in the |
Yeah, it requires slightly more expressiveness than the extract system is currently capable of, specifically it currently doesn't handle components that are derived in the render world but are not part of extraction. There are several other possible workarounds:
I'd prefer to add a TODO here, and then do a follow up PR that extends SyncComponent/ExtractComponent with features to solve this, and then a second follow up PR that goes through a bunch of the rendering systems and cleans the ad-hoc syncing up. |
kfc35
left a comment
There was a problem hiding this comment.
This also fixes the example for me.
The plan to follow up afterwards sounds reasonable, but if things get busy, I’d suggest to make an issue from your comment so it’s not lost / someone else can continue the vision
Objective
Fixes #22963
Solution
Remove derived resources for SMAA in the render world when the
Smaacomponent is removed, so the view query doesn't keep running.As a follow-up, we should add something equivalent to this as an option to the
ExtractComponentmacro.Testing
Check that the problem with
cargo run --example anti_aliasingand moving between AA modes.