Skip to content

Commit b809e8e

Browse files
committed
bevy_pbr: Fix ClusterConfig::None (bevyengine#4483)
# Objective - Fix `ClusterConfig::None` - This fix is from @robtfm but they didn't have time to submit it, so I am. ## Solution - Always clear clusters and skip processing when `ClusterConfig::None` - Conditionally remove `VisiblePointLights` from the view if it is present
1 parent 424d4d2 commit b809e8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/bevy_pbr/src/light.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,10 @@ pub(crate) fn assign_lights_to_clusters(
731731
{
732732
let clusters = clusters.into_inner();
733733

734-
if matches!(config, ClusterConfig::None) && visible_lights.is_some() {
735-
commands.entity(view_entity).remove::<VisiblePointLights>();
734+
if matches!(config, ClusterConfig::None) {
735+
if visible_lights.is_some() {
736+
commands.entity(view_entity).remove::<VisiblePointLights>();
737+
}
736738
clusters.clear();
737739
continue;
738740
}

0 commit comments

Comments
 (0)