Skip to content

Commit 303e843

Browse files
authored
Set projector emissive texture (#946)
Set projector emissive texture to be the same as the diffuse texture in ogre 2.x implementation for a more consistent result with the ogre 1.x implementation Signed-off-by: Ian Chen <ichen@openrobotics.org>
1 parent c42123e commit 303e843

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ogre2/src/Ogre2Projector.cc

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ void Ogre2Projector::UpdateCameraListener()
168168
this->dataPtr->decalNode->setVisible(true);
169169
this->dataPtr->decalNode->getCreator()->setDecalsDiffuse(
170170
this->dataPtr->decal->getDiffuseTexture());
171+
this->dataPtr->decalNode->getCreator()->setDecalsEmissive(
172+
this->dataPtr->decal->getEmissiveTexture());
171173

172174
for (auto &ogreCamIt : this->dataPtr->camerasWithListener)
173175
{
@@ -276,6 +278,7 @@ void Ogre2Projector::CreateProjector()
276278
Ogre::GpuResidency::Resident);
277279

278280
this->dataPtr->decal->setDiffuseTexture(this->dataPtr->textureDiff);
281+
this->dataPtr->decal->setEmissiveTexture(this->dataPtr->textureDiff);
279282

280283
// approximate frustum size
281284
common::Image image(this->textureName);
@@ -332,6 +335,8 @@ void Ogre2ProjectorCameraListener::cameraPreRenderScene(
332335
this->decalNode->setVisible(true);
333336
this->decalNode->getCreator()->setDecalsDiffuse(
334337
this->decal->getDiffuseTexture());
338+
this->decalNode->getCreator()->setDecalsEmissive(
339+
this->decal->getEmissiveTexture());
335340
}
336341
}
337342

0 commit comments

Comments
 (0)