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

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

Open
paroj opened this issue Sep 8, 2021 · 0 comments
Open

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

paroj opened this issue Sep 8, 2021 · 0 comments

Comments

@paroj
Copy link
Member

paroj commented Sep 8, 2021

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 paroj changed the title Sometimes a shadow-caster material can be un-initialised With additive lighting a shadow-caster material can be un-initialised Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant