diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-04-27 12:37:41 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-04-27 12:37:41 +0400 |
commit | a5806778012e3baee8ac2ba48c8dbed8b57f3947 (patch) | |
tree | 6429b3f6904f6faabb6338536dd7ab06b6b8974e /source | |
parent | ac849f98f5262a0776f2b7df152675608b109d03 (diff) |
BGE: Small fix to allow clip alpha to work with alpha shadows.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 853cfa53da2..aa4381dee38 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -400,7 +400,7 @@ KX_BlenderMaterial::ActivatShaders( if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) tmp->setShaderData(true, rasty); - else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && IsAlpha() && !rasty->GetUsingOverrideShader()) + else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && mMaterial->alphablend != GEMAT_SOLID && !rasty->GetUsingOverrideShader()) tmp->setShaderData(true, rasty); else tmp->setShaderData(false, rasty); @@ -447,7 +447,7 @@ KX_BlenderMaterial::ActivateBlenderShaders( if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) tmp->setBlenderShaderData(true, rasty); - else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && IsAlpha() && !rasty->GetUsingOverrideShader()) + else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && mMaterial->alphablend != GEMAT_SOLID && !rasty->GetUsingOverrideShader()) tmp->setBlenderShaderData(true, rasty); else tmp->setBlenderShaderData(false, rasty); @@ -498,7 +498,7 @@ KX_BlenderMaterial::ActivateMat( if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) tmp->setTexData( true,rasty ); - else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && IsAlpha() && !rasty->GetUsingOverrideShader()) + else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && mMaterial->alphablend != GEMAT_SOLID && !rasty->GetUsingOverrideShader()) tmp->setTexData(true, rasty); else tmp->setTexData( false,rasty); @@ -635,7 +635,7 @@ void KX_BlenderMaterial::ActivatGLMaterials( RAS_IRasterizer* rasty )const void KX_BlenderMaterial::ActivateTexGen(RAS_IRasterizer *ras) const { if (ras->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED || - (ras->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && IsAlpha() && !ras->GetUsingOverrideShader())) { + (ras->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW && mMaterial->alphablend != GEMAT_SOLID && !ras->GetUsingOverrideShader())) { ras->SetAttribNum(0); if (mShader && GLEW_ARB_shader_objects) { if (mShader->GetAttribute() == BL_Shader::SHD_TANGENT) { |