I'm using cached shadow maps to improve my performance, but as the title says, my performance improved in one area but got worse in another.
I marked my static geometry with the “Static Shadow Caster” flag, as well as some of my dynamic objects that remain in one place, so that their shadows are also cached.
This is how I update cascades: https://pastebin.com/JhTzRs1u
As you can see in the script, shadow update mode is OnDemand and "Always Draw Dynamic" is enabled as well.
What can cause it?
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.