Fix splatting, which had been broken by a recent commit of mine

This commit is contained in:
Marianne Gagnon 2014-08-03 20:03:17 -04:00
parent 346faff845
commit 072c118f95

View File

@ -881,6 +881,18 @@ void IrrDriver::setAllMaterialFlags(scene::IMesh *mesh) const
video::SMaterial &irr_material=mb->getMaterial();
video::ITexture* t=irr_material.getTexture(0);
if(t) material_manager->setAllMaterialFlags(t, mb);
// special case : for splatting, the main material is on layer 1.
// it was done this way to provide a fallback for computers
// where shaders are not supported
t = irr_material.getTexture(1);
if (t)
{
Material* mat = material_manager->getMaterialFor(t, mb);
if (mat != NULL && mat->getShaderType() == Material::SHADERTYPE_SPLATTING)
material_manager->setAllMaterialFlags(t, mb);
}
material_manager->setAllUntexturedMaterialFlags(mb);
} // for i<getMeshBufferCount()
} // setAllMaterialFlags