Set normal map and detail map in material.cpp

This commit is contained in:
vlj 2014-09-28 02:35:50 +02:00
parent 7b165574c0
commit 273a2bf022

View File

@ -784,6 +784,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
// Material and shaders
m->MaterialType = irr_driver->getShader(ES_NORMAL_MAP);
m->setTexture(1, glossytex);
m_shader_type = SHADERTYPE_NORMAL_MAP;
return;
}
@ -795,6 +796,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
m->setTexture(2, m->getTexture(1));
if (!m->getTexture(2))
m->setTexture(2, getUnicolorTexture(SColor(255, 255, 255, 255)));
m_shader_type = SHADERTYPE_DETAIL_MAP;
}
m->setTexture(1, glossytex);
}