ogre icon indicating copy to clipboard operation
ogre copied to clipboard

With additive lighting a shadow-caster material can be un-initialised

Open paroj opened this issue 2 years ago • 0 comments

which leads to missing shaders as the RTSS is not being run. This is a workaround

diff --git a/OgreMain/src/OgreRenderQueue.cpp b/OgreMain/src/OgreRenderQueue.cpp
index fc48be3b2..05554a452 100644
--- a/OgreMain/src/OgreRenderQueue.cpp
+++ b/OgreMain/src/OgreRenderQueue.cpp
@@ -81,8 +81,10 @@ namespace Ogre {
             defaultMat->load();
             pTech = defaultMat->getBestTechnique();
         }
-        else
+        else {
+            pRend->getMaterial()->touch();
             pTech = pRend->getTechnique();
+        }
 
         if (mRenderableListener)
         {

but, we need to find the root-cause.

paroj avatar Sep 08 '21 10:09 paroj