BGE: Make sure we are writting to the depth buffer when rendering alpha polygons...
authorMitchell Stokes <mogurijin@gmail.com>
Sun, 10 Feb 2013 08:28:47 +0000 (08:28 +0000)
committerMitchell Stokes <mogurijin@gmail.com>
Sun, 10 Feb 2013 08:28:47 +0000 (08:28 +0000)
source/gameengine/Rasterizer/RAS_BucketManager.cpp

index df72056..b2b766b 100644 (file)
@@ -148,7 +148,8 @@ void RAS_BucketManager::RenderAlphaBuckets(
        // Having depth masks disabled/enabled gives different artifacts in
        // case no sorting is done or is done inexact. For compatibility, we
        // disable it.
-       rasty->SetDepthMask(RAS_IRasterizer::KX_DEPTHMASK_DISABLED);
+       if (rasty->GetDrawingMode() != RAS_IRasterizer::KX_SHADOW)
+               rasty->SetDepthMask(RAS_IRasterizer::KX_DEPTHMASK_DISABLED);
 
        OrderBuckets(cameratrans, m_AlphaBuckets, slots, true);