bevy_pbr: Fix ClusterConfig::None (#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
This commit is contained in:
parent
424d4d26f1
commit
b809e8e931
@ -731,8 +731,10 @@ pub(crate) fn assign_lights_to_clusters(
|
||||
{
|
||||
let clusters = clusters.into_inner();
|
||||
|
||||
if matches!(config, ClusterConfig::None) && visible_lights.is_some() {
|
||||
commands.entity(view_entity).remove::<VisiblePointLights>();
|
||||
if matches!(config, ClusterConfig::None) {
|
||||
if visible_lights.is_some() {
|
||||
commands.entity(view_entity).remove::<VisiblePointLights>();
|
||||
}
|
||||
clusters.clear();
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user