@@ -4,7 +4,7 @@ use bevy_camera::Camera;
44use bevy_ecs:: { entity:: EntityHashMap , prelude:: * } ;
55use bevy_light:: {
66 cluster:: { ClusterableObjectCounts , Clusters , GlobalClusterSettings } ,
7- ClusteredDecal , EnvironmentMapLight , IrradianceVolume , LightProbe , PointLight , SpotLight ,
7+ ClusteredDecal , EnvironmentMapLight , IrradianceVolume , PointLight , SpotLight ,
88} ;
99use bevy_math:: { uvec4, UVec3 , UVec4 , Vec4 } ;
1010use bevy_render:: {
@@ -296,14 +296,17 @@ pub fn extract_clusters(
296296 Query <
297297 (
298298 Option < & RenderEntity > ,
299+ Has < PointLight > ,
300+ Has < SpotLight > ,
299301 Has < EnvironmentMapLight > ,
300302 Has < IrradianceVolume > ,
301303 Has < ClusteredDecal > ,
302304 ) ,
303305 Or < (
304306 With < PointLight > ,
305307 With < SpotLight > ,
306- With < LightProbe > ,
308+ With < EnvironmentMapLight > ,
309+ With < IrradianceVolume > ,
307310 With < ClusteredDecal > ,
308311 ) > ,
309312 > ,
@@ -326,6 +329,8 @@ pub fn extract_clusters(
326329 for clusterable_entity in cluster_objects. iter ( ) {
327330 let Ok ( (
328331 maybe_render_entity,
332+ is_point_light,
333+ is_spot_light,
329334 is_reflection_probe,
330335 is_irradiance_volume,
331336 is_clustered_decal,
@@ -341,7 +346,7 @@ pub fn extract_clusters(
341346 if let Some ( render_entity) = maybe_render_entity {
342347 if is_clustered_decal {
343348 data. push ( ExtractedClusterableObjectElement :: Decal ( * * render_entity) ) ;
344- } else {
349+ } else if is_point_light || is_spot_light {
345350 data. push ( ExtractedClusterableObjectElement :: Light ( * * render_entity) ) ;
346351 }
347352 }
0 commit comments