From a3fab3d4c409fa522ddaf461e83a4a4f3435f335 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 22 Dec 2014 17:52:02 -0600 Subject: [PATCH] Projected Shadow fix With Permission from Jeff Faust. // AFX CODE BLOCK (bug-fix) << // For ShapeBase objects this causes the shader to fade along with the // object and also prevents a rectangular shadow artifact from occuring // once the visibility is zero. --- Engine/source/lighting/common/projectedShadow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine/source/lighting/common/projectedShadow.cpp b/Engine/source/lighting/common/projectedShadow.cpp index 8918ddf5a..1ad88cd10 100644 --- a/Engine/source/lighting/common/projectedShadow.cpp +++ b/Engine/source/lighting/common/projectedShadow.cpp @@ -230,6 +230,9 @@ bool ProjectedShadow::_updateDecal( const SceneRenderState *state ) lightCount++; } + if (mShapeBase) + fade *= mShapeBase->getFadeVal(); + lightDir.normalize(); // No light... no shadow.