diff --git a/OgreMain/src/OgreHlms.cpp b/OgreMain/src/OgreHlms.cpp index 347cc47560..aa650b0c8d 100644 --- a/OgreMain/src/OgreHlms.cpp +++ b/OgreMain/src/OgreHlms.cpp @@ -3660,8 +3660,13 @@ namespace Ogre // Low level is a special case because it doesn't (yet?) support parallel compilation if( !parallelQueue || mType == HLMS_LOW_LEVEL ) { + bool saveShadowCasterProp = getProperty( kNoTid, HlmsBaseProp::ShadowCaster ); + if(saveShadowCasterProp!=casterPass) + setProperty( kNoTid, HlmsBaseProp::ShadowCaster, casterPass ); lastReturnedValue = createShaderCacheEntry( hash[0], passCache, finalHash, queuedRenderable, nullptr, kNoTid ); + if(saveShadowCasterProp!=casterPass) + setProperty( kNoTid, HlmsBaseProp::ShadowCaster, saveShadowCasterProp ); } else {