Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Projector emissive texture #946

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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 @@
this->decalNode->setVisible(true);
this->decalNode->getCreator()->setDecalsDiffuse(
this->decal->getDiffuseTexture());
this->decalNode->getCreator()->setDecalsEmissive(
this->decal->getEmissiveTexture());
}
}

Expand Down
Loading