From 3858d8fc785a85ff39f94cce791e986c23aaac0f Mon Sep 17 00:00:00 2001 From: Vsevolod Kremianskii Date: Wed, 17 Feb 2021 23:00:25 +0700 Subject: [PATCH] fix: Room models must never produce shadows (because artifacts) --- src/scene/node/modelnodescenenode.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/scene/node/modelnodescenenode.cpp b/src/scene/node/modelnodescenenode.cpp index 75545325..6e4c5988 100644 --- a/src/scene/node/modelnodescenenode.cpp +++ b/src/scene/node/modelnodescenenode.cpp @@ -89,13 +89,7 @@ bool ModelNodeSceneNode::shouldRender() const { bool ModelNodeSceneNode::shouldCastShadows() const { shared_ptr mesh(_modelNode->mesh()); - if (!mesh) return false; - - if (isFeatureEnabled(Feature::DynamicRoomLighting) && _modelSceneNode->classification() == ModelSceneNode::Classification::Room) { - return mesh->shouldRender() && !_modelNode->isSelfIllumEnabled(); - } - - return mesh->shouldCastShadows() && !static_cast(_modelNode->skin()); + return mesh && mesh->shouldCastShadows() && !static_cast(_modelNode->skin()); } bool ModelNodeSceneNode::isTransparent() const {