From 99a76aee87b6dc8394a47205cf8c7cae51a4bc50 Mon Sep 17 00:00:00 2001 From: "Dmytro Yunchyk(aka DimA)" Date: Mon, 21 Oct 2024 15:56:38 +0300 Subject: [PATCH] fixed shader cache entry creation in HlmsLowLevel::createShaderCacheEntry() when getProperty( kNoTid, HlmsBaseProp::ShadowCaster )!=casterPass --- OgreMain/src/OgreHlms.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OgreMain/src/OgreHlms.cpp b/OgreMain/src/OgreHlms.cpp index 347cc47560..cfc208d4e6 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 {