Explorar o código

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.
Azaezel %!s(int64=10) %!d(string=hai) anos
pai
achega
a3fab3d4c4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Engine/source/lighting/common/projectedShadow.cpp

+ 3 - 0
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.