From 290737566fff82e3b4aceb0d4a477d2a7d965a53 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 2 Dec 2021 23:18:22 -0800 Subject: [PATCH] partial fix for emissive map Signed-off-by: Ian Chen --- ogre2/src/Ogre2Material.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ogre2/src/Ogre2Material.cc b/ogre2/src/Ogre2Material.cc index 6e5215220..5ca027d98 100644 --- a/ogre2/src/Ogre2Material.cc +++ b/ogre2/src/Ogre2Material.cc @@ -541,7 +541,8 @@ void Ogre2Material::ClearLightMap() this->lightMapUvSet = 0u; // in ogre 2.2, we swtiched to use the emissive map slot for light map - this->ogreDatablock->setTexture(Ogre::PBSM_EMISSIVE, this->lightMapName); + if (this->ogreDatablock->getUseEmissiveAsLightmap()) + this->ogreDatablock->setTexture(Ogre::PBSM_EMISSIVE, this->lightMapName); this->ogreDatablock->setUseEmissiveAsLightmap(false); }