Skip to content

Commit

Permalink
Set projector emissive texture
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Nov 30, 2023
1 parent c42123e commit 5df32b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ogre2/src/Ogre2Projector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ void Ogre2Projector::UpdateCameraListener()
this->dataPtr->decalNode->setVisible(true);
this->dataPtr->decalNode->getCreator()->setDecalsDiffuse(
this->dataPtr->decal->getDiffuseTexture());
this->dataPtr->decalNode->getCreator()->setDecalsEmissive(
this->dataPtr->decal->getEmissiveTexture());

Check warning on line 172 in ogre2/src/Ogre2Projector.cc

View check run for this annotation

Codecov / codecov/patch

ogre2/src/Ogre2Projector.cc#L171-L172

Added lines #L171 - L172 were not covered by tests

for (auto &ogreCamIt : this->dataPtr->camerasWithListener)
{
Expand Down Expand Up @@ -276,6 +278,7 @@ void Ogre2Projector::CreateProjector()
Ogre::GpuResidency::Resident);

this->dataPtr->decal->setDiffuseTexture(this->dataPtr->textureDiff);
this->dataPtr->decal->setEmissiveTexture(this->dataPtr->textureDiff);

// approximate frustum size
common::Image image(this->textureName);
Expand Down Expand Up @@ -332,6 +335,8 @@ void Ogre2ProjectorCameraListener::cameraPreRenderScene(
this->decalNode->setVisible(true);
this->decalNode->getCreator()->setDecalsDiffuse(
this->decal->getDiffuseTexture());
this->decalNode->getCreator()->setDecalsEmissive(
this->decal->getEmissiveTexture());
}
}

Expand Down

0 comments on commit 5df32b9

Please sign in to comment.