Properly fix gloss maps
This commit is contained in:
parent
58e20bebd7
commit
90042bc9e4
@ -951,7 +951,14 @@ void IrrDriver::setAllMaterialFlags(scene::IMesh *mesh) const
|
|||||||
scene::IMeshBuffer *mb = mesh->getMeshBuffer(i);
|
scene::IMeshBuffer *mb = mesh->getMeshBuffer(i);
|
||||||
video::SMaterial &irr_material = mb->getMaterial();
|
video::SMaterial &irr_material = mb->getMaterial();
|
||||||
video::ITexture* t = irr_material.getTexture(0);
|
video::ITexture* t = irr_material.getTexture(0);
|
||||||
if(t) material_manager->setAllMaterialFlags(t, mb);
|
if (t)
|
||||||
|
{
|
||||||
|
material_manager->setAllMaterialFlags(t, mb);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
material_manager->setAllUntexturedMaterialFlags(mb);
|
||||||
|
}
|
||||||
|
|
||||||
// special case : for splatting, the main material is on layer 1.
|
// special case : for splatting, the main material is on layer 1.
|
||||||
// it was done this way to provide a fallback for computers
|
// it was done this way to provide a fallback for computers
|
||||||
@ -963,10 +970,7 @@ void IrrDriver::setAllMaterialFlags(scene::IMesh *mesh) const
|
|||||||
if (mat != NULL && mat->getShaderType() == Material::SHADERTYPE_SPLATTING)
|
if (mat != NULL && mat->getShaderType() == Material::SHADERTYPE_SPLATTING)
|
||||||
material_manager->setAllMaterialFlags(t, mb);
|
material_manager->setAllMaterialFlags(t, mb);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
material_manager->setAllUntexturedMaterialFlags(mb);
|
|
||||||
}
|
|
||||||
} // for i<getMeshBufferCount()
|
} // for i<getMeshBufferCount()
|
||||||
} // setAllMaterialFlags
|
} // setAllMaterialFlags
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user