File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -793,12 +793,16 @@ pub(crate) fn assign_lights_to_clusters(
793
793
}
794
794
795
795
let clusters = clusters. into_inner ( ) ;
796
- let screen_size = camera. target . get_physical_size ( & windows, & images) ;
796
+ let screen_size =
797
+ if let Some ( screen_size) = camera. target . get_physical_size ( & windows, & images) {
798
+ screen_size
799
+ } else {
800
+ continue ;
801
+ } ;
797
802
798
803
clusters. aabbs . clear ( ) ;
799
804
clusters. lights . clear ( ) ;
800
805
801
- let screen_size = screen_size. unwrap_or_default ( ) ;
802
806
let mut requested_cluster_dimensions = config. dimensions_for_screen_size ( screen_size) ;
803
807
804
808
let view_transform = camera_transform. compute_matrix ( ) ;
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ impl RenderTarget {
79
79
UVec2 :: new ( width, height)
80
80
} ) ,
81
81
}
82
+ . filter ( |size| size. x > 0 && size. y > 0 )
82
83
}
83
84
pub fn get_logical_size ( & self , windows : & Windows , images : & Assets < Image > ) -> Option < Vec2 > {
84
85
match self {
@@ -312,8 +313,8 @@ pub fn extract_cameras<M: Component + Default>(
312
313
ExtractedView {
313
314
projection : camera. projection_matrix ,
314
315
transform : * transform,
315
- width : size. x . max ( 1 ) ,
316
- height : size. y . max ( 1 ) ,
316
+ width : size. x ,
317
+ height : size. y ,
317
318
near : camera. near ,
318
319
far : camera. far ,
319
320
} ,
You can’t perform that action at this time.
0 commit comments