Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-08-25 00:28:54 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-08-25 00:28:54 +0400
commit7fc26e0123e700113f340068a964c1a12133b7e1 (patch)
tree50a81047e60a7b8791181fb877915cee2a641ff2 /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
parent81a8f3e88592e6a570ab7e2f844c298a320480f5 (diff)
Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport and BGE" by me.
Description from the tracker: "It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE."
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 7647f7d3f27..85284096bb9 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -586,6 +586,9 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I
RAS_IRenderTools *rendertools)
{
bool uselights;
+
+ if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !m_material->CastsShadows())
+ return false;
if(!rasty->SetMaterial(*m_material))
return false;