mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 21:41:33 +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)
|
while (passIt.hasMoreElements() && !transparent)
|
||||||
{
|
{
|
||||||
Ogre::Pass* pass = passIt.getNext();
|
Ogre::Pass* pass = passIt.getNext();
|
||||||
|
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||||
if (pass->getDepthWriteEnabled() == false)
|
|
||||||
transparent = true;
|
transparent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,7 @@ CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
|
||||||
while (passIt.hasMoreElements() && !transparent)
|
while (passIt.hasMoreElements() && !transparent)
|
||||||
{
|
{
|
||||||
Ogre::Pass* pass = passIt.getNext();
|
Ogre::Pass* pass = passIt.getNext();
|
||||||
|
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||||
if (pass->getDepthWriteEnabled() == false)
|
|
||||||
transparent = true;
|
transparent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, Ogre::SceneNode* node, MWWor
|
||||||
while (passIt.hasMoreElements())
|
while (passIt.hasMoreElements())
|
||||||
{
|
{
|
||||||
Ogre::Pass* pass = passIt.getNext();
|
Ogre::Pass* pass = passIt.getNext();
|
||||||
if (pass->getDepthWriteEnabled() == false)
|
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||||
transparent = true;
|
transparent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,8 +148,7 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh, bool
|
||||||
while (passIt.hasMoreElements())
|
while (passIt.hasMoreElements())
|
||||||
{
|
{
|
||||||
Ogre::Pass* pass = passIt.getNext();
|
Ogre::Pass* pass = passIt.getNext();
|
||||||
|
if(pass->getSourceBlendFactor() != Ogre::SBF_ONE || pass->getDestBlendFactor() != Ogre::SBF_ZERO)
|
||||||
if (pass->getDepthWriteEnabled() == false)
|
|
||||||
transparent = true;
|
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 += getBlendFactor((alphaFlags>>1)&0xf);
|
||||||
blend_mode += " ";
|
blend_mode += " ";
|
||||||
blend_mode += getBlendFactor((alphaFlags>>5)&0xf);
|
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)));
|
instance->setProperty("scene_blend", sh::makeProperty(new sh::StringValue(blend_mode)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue