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>2014-01-27 07:28:26 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-03-20 10:57:49 +0400
commite02b9c8a45266993e5cefb71d55234128aca208c (patch)
treed9d29a0b6a0ee81b879c9665ce74f6370829257e /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
parent9d4b54b44fccabffeebd45c86f8e344e67327ad3 (diff)
BGE: Adding support for the Cast Only material option.
Note: This does not add support for the option in the viewport.
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 0c715524218..4b5fc6510e0 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -587,6 +587,9 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I
if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && !m_material->CastsShadows())
return false;
+ if (rasty->GetDrawingMode() != RAS_IRasterizer::KX_SHADOW && m_material->OnlyShadow())
+ return false;
+
if (!rasty->SetMaterial(*m_material))
return false;