Bevy version and features
What you did
Tried running the OIT example and toggling OIT off
What went wrong
WGPU validation errors
Additional information
bbcc1e6 changed the logic in SyncComponentPlugin and entity_sync_system so that it no longer despawns and respawns the corresponding render world entity when a component is removed from the main world entity, and instead only removes the components specified in SyncComponent::Out. This means some components added elsewhere might remain and systems that assume those components always exist together will break.
For example if you remove OrderIndependentTransparancySettings, the extracted camera entity still has OitResolvePipelineId and OrderIndependentTransparencySettingsOffset (these were added by calling EntityCommands::insert), which means oit_resolve still tries to run the OIT resolve pass and the SetMeshViewBindGroup render command adds a dynamic offset that does not match the bind group layout since it thinks OIT is still being used.
In the OIT case those two functions could be changed to check Has<OrderIndependentTransparancySettings> and it would work again, but I think there may be many other other cases where render world logic assumes certain components exist together without checking because that was fine before.
Bevy version and features
mainsince bbcc1e6What you did
Tried running the OIT example and toggling OIT off
What went wrong
WGPU validation errors
Additional information
bbcc1e6 changed the logic in
SyncComponentPluginandentity_sync_systemso that it no longer despawns and respawns the corresponding render world entity when a component is removed from the main world entity, and instead only removes the components specified inSyncComponent::Out. This means some components added elsewhere might remain and systems that assume those components always exist together will break.For example if you remove
OrderIndependentTransparancySettings, the extracted camera entity still hasOitResolvePipelineIdandOrderIndependentTransparencySettingsOffset(these were added by callingEntityCommands::insert), which meansoit_resolvestill tries to run the OIT resolve pass and theSetMeshViewBindGrouprender command adds a dynamic offset that does not match the bind group layout since it thinks OIT is still being used.In the OIT case those two functions could be changed to check
Has<OrderIndependentTransparancySettings>and it would work again, but I think there may be many other other cases where render world logic assumes certain components exist together without checking because that was fine before.