Commit ab0ca53b authored by cutealien's avatar cutealien

SMaterial::isTransparent now nearly back to how it looked like once.

Otherwise materials like EMT_TRANSPARENT_ALPHA_CHANNEL no longer worked.
Not sure if this is now causing other problems, but it no longer seems to break the known cases (tests about that pass again). If there are new problems we need new tests to show 'em.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5086 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 3871ba4a
...@@ -730,7 +730,11 @@ namespace video ...@@ -730,7 +730,11 @@ namespace video
bool isTransparent() const bool isTransparent() const
{ {
bool status = false; if ( MaterialType==EMT_TRANSPARENT_ADD_COLOR ||
MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL ||
MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA ||
MaterialType==EMT_TRANSPARENT_REFLECTION_2_LAYER )
return true;
if (BlendOperation != EBO_NONE && BlendFactor != 0.f) if (BlendOperation != EBO_NONE && BlendFactor != 0.f)
{ {
...@@ -746,12 +750,13 @@ namespace video ...@@ -746,12 +750,13 @@ namespace video
if (textureBlendFunc_hasAlpha(srcRGBFact) || textureBlendFunc_hasAlpha(dstRGBFact) || if (textureBlendFunc_hasAlpha(srcRGBFact) || textureBlendFunc_hasAlpha(dstRGBFact) ||
textureBlendFunc_hasAlpha(srcAlphaFact) || textureBlendFunc_hasAlpha(dstAlphaFact)) textureBlendFunc_hasAlpha(srcAlphaFact) || textureBlendFunc_hasAlpha(dstAlphaFact))
{ {
status = true; return true;
} }
} }
return status; return false;
} }
}; };
//! global const identity Material //! global const identity Material
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment