bevy_pbr: Do not cull meshes without Aabbs from cascades (#8444)
# Objective - Mesh entities should cast shadows when not having Aabbs and having NoFrustumCulling - Fixes #8442 ## Solution - Mesh entities with NoFrustumCulling get no automatic Aabbs added - Point and spot lights do not cull mesh entities for their shadow mapping if they do not have an Aabb, but directional lights do - Make directional lights not cull mesh entities from cascades if the do not have Aabbs. So no Aabb as a consequence of a NoFrustumCulling component will mean that those mesh entities are not culled and so are visible to the light. --- ## Changelog - Fixed: Mesh entities with NoFrustumCulling will cast shadows for directional light shadow maps
This commit is contained in:
		
							parent
							
								
									9db70da96f
								
							
						
					
					
						commit
						d8102a0a04
					
				| @ -2029,6 +2029,18 @@ pub fn check_light_mesh_visibility( | |||||||
|                         frustum_visible_entities.entities.push(entity); |                         frustum_visible_entities.entities.push(entity); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  |             } else { | ||||||
|  |                 computed_visibility.set_visible_in_view(); | ||||||
|  |                 for view in frusta.frusta.keys() { | ||||||
|  |                     let view_visible_entities = visible_entities | ||||||
|  |                         .entities | ||||||
|  |                         .get_mut(view) | ||||||
|  |                         .expect("Per-view visible entities should have been inserted already"); | ||||||
|  | 
 | ||||||
|  |                     for frustum_visible_entities in view_visible_entities { | ||||||
|  |                         frustum_visible_entities.entities.push(entity); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Robert Swain
						Robert Swain