File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use bevy::{
1111 renderer:: RenderDevice ,
1212 sync_world:: { MainEntity , MainEntityHashMap , RenderEntity } ,
1313 texture:: { FallbackImage , GpuImage } ,
14- view:: RenderLayers ,
14+ view:: { PreviousVisibleEntities , RenderLayers } ,
1515 Extract ,
1616 } ,
1717} ;
@@ -93,11 +93,15 @@ pub(crate) struct OutlineInstanceBindGroup {
9393 pub bind_group : BindGroup ,
9494}
9595
96- pub ( crate ) fn set_outline_visibility ( mut query : Query < ( & mut ViewVisibility , & ComputedOutline ) > ) {
97- for ( mut visibility, computed) in query. iter_mut ( ) {
96+ pub ( crate ) fn set_outline_visibility (
97+ mut query : Query < ( Entity , & mut ViewVisibility , & ComputedOutline ) > ,
98+ mut previous_visible : ResMut < PreviousVisibleEntities > ,
99+ ) {
100+ for ( entity, mut visibility, computed) in query. iter_mut ( ) {
98101 if let ComputedOutline ( Some ( computed) ) = computed {
99102 if computed. volume . value . enabled || computed. stencil . value . enabled {
100103 visibility. set ( ) ;
104+ previous_visible. remove ( & entity) ;
101105 }
102106 }
103107 }
You can’t perform that action at this time.
0 commit comments