Skip to content

Commit

Permalink
Fix ThermalCamera not always restoring the material after it's done
Browse files Browse the repository at this point in the history
Signed-off-by: Matias N. Goldberg <[email protected]>
  • Loading branch information
darksylinc committed Mar 12, 2022
1 parent 6d96fa2 commit 722f794
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ogre2/src/Ogre2ThermalCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ void Ogre2ThermalCameraMaterialSwitcher::cameraPreRenderScene(

if (!subItem->getMaterial().isNull())
{
this->materialMap.push_back({ subItem, subItem->getMaterial() });

// We need to keep the material's vertex shader
// to keep vertex deformation consistent; so we use
// a cloned material with a different pixel shader
Expand Down Expand Up @@ -487,6 +489,8 @@ void Ogre2ThermalCameraMaterialSwitcher::cameraPreRenderScene(

if (!subItem->getMaterial().isNull())
{
this->materialMap.push_back({ subItem, subItem->getMaterial() });

// We need to keep the material's vertex shader
// to keep vertex deformation consistent; so we use
// a cloned material with a different pixel shader
Expand Down

0 comments on commit 722f794

Please sign in to comment.