mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 17:09:40 +00:00
Don't disable depth writes when blending is enabled
This commit is contained in:
parent
1f24763881
commit
1168f15361
5 changed files with 4 additions and 9 deletions
|
@ -42,8 +42,7 @@ ActivatorAnimation::ActivatorAnimation(const MWWorld::Ptr &ptr)
|
|||
while (passIt.hasMoreElements() && !transparent)
|
||||
{
|
||||
Ogre::Pass* pass = passIt.getNext();
|
||||
|
||||
if (pass->getDepthWriteEnabled() == false)
|
||||
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||
transparent = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,7 @@ CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
|
|||
while (passIt.hasMoreElements() && !transparent)
|
||||
{
|
||||
Ogre::Pass* pass = passIt.getNext();
|
||||
|
||||
if (pass->getDepthWriteEnabled() == false)
|
||||
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||
transparent = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, Ogre::SceneNode* node, MWWor
|
|||
while (passIt.hasMoreElements())
|
||||
{
|
||||
Ogre::Pass* pass = passIt.getNext();
|
||||
if (pass->getDepthWriteEnabled() == false)
|
||||
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||
transparent = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,8 +148,7 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh, bool
|
|||
while (passIt.hasMoreElements())
|
||||
{
|
||||
Ogre::Pass* pass = passIt.getNext();
|
||||
|
||||
if (pass->getDepthWriteEnabled() == false)
|
||||
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||
transparent = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -716,8 +716,6 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String
|
|||
blend_mode += getBlendFactor((alphaFlags>>1)&0xf);
|
||||
blend_mode += " ";
|
||||
blend_mode += getBlendFactor((alphaFlags>>5)&0xf);
|
||||
|
||||
instance->setProperty("depth_write", sh::makeProperty(new sh::StringValue("off")));
|
||||
instance->setProperty("scene_blend", sh::makeProperty(new sh::StringValue(blend_mode)));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue