Skip to content

Commit

Permalink
partial fix for emissive map (#501)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
  • Loading branch information
iche033 authored Dec 3, 2021
1 parent ae292a8 commit f025610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ogre2/src/Ogre2Material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f025610

Please sign in to comment.