By default, shadows are totally disabled. I wanted to keep this the case, but add the ability for trombackgrounds to enable them at will.
Since shadow settings are persistent, this means toggling them off, then checking if the trombackground wants to toggle them on.
I used the same technique for opting into shadows as opting out of the lighting system: An object after foreground and background named "AddShadows" will enable shadows.
Changes
Always flip shadows off at the same time that bloom is applied
Check and flip shadows on at the same time lighting settings are applied.
Testing
I created two test scenes, one with shadows and one without. They're otherwise identical, with a light that should cast a shadow on the scene with shadows enabled. On the scene with shadows disabled, the same setup should cast no light.
Check the scene with shadows disabled: no shadows appear
Check the scene with shadows enabled: shadows appear
Without closing the game, check the scene with shadows disabled again: no shadows appear
Motivation
By default, shadows are totally disabled. I wanted to keep this the case, but add the ability for trombackgrounds to enable them at will.
Since shadow settings are persistent, this means toggling them off, then checking if the trombackground wants to toggle them on.
I used the same technique for opting into shadows as opting out of the lighting system: An object after foreground and background named "AddShadows" will enable shadows.
Changes
Testing
I created two test scenes, one with shadows and one without. They're otherwise identical, with a light that should cast a shadow on the scene with shadows enabled. On the scene with shadows disabled, the same setup should cast no light.