diff options
Diffstat (limited to 'servers/visual/visual_server_scene.cpp')
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 3ee23e9290..faf5a1f8fa 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -3387,11 +3387,7 @@ void VisualServerScene::_update_dirty_instance(Instance *p_instance) { RID mat = VSG::storage->immediate_get_material(p_instance->base); - if (!mat.is_valid() || VSG::storage->material_casts_shadows(mat)) { - can_cast_shadows = true; - } else { - can_cast_shadows = false; - } + can_cast_shadows = !mat.is_valid() || VSG::storage->material_casts_shadows(mat); if (mat.is_valid() && VSG::storage->material_is_animated(mat)) { is_animated = true; |