I have a simple scene with a box, ambient light (color 0.5f), directional light (color 0.5f) and a DirectionalLightShadowFilter (though the problem is the same with a renderer).
The problem is that the shadow seems to affect also the color contribution from ambient light, which seems to be strange for me. Is this behavior correct? In my opinion, the color from ambient light should be “added” after the shadow, i.e. the shadow should only “cancel” the color contribution from the directional light.
This behavior also leads to the strange behavior that when having directional light of color (0,0,0,1) and ambient light of color 1, there are still shadows with full intensity.
Shadows are post-processed. This means the shadows are calculated after lighting. Their calculations have no bearing on lighting at all.
Game development is all about smoke and daggers, though. If you could explain your situation as a game-type problem there might be a known solution.
For example, typically when characters enter tunnels and caves, the lighting is changed somewhat to reflect that. It may appear as if it “just works” - but in fact lighting values are changed to “simulate” being indoors.
Ok, here is my game-type problem:
I have a small object which is completely shadowed by a large object. It looks absolutely unrealistic, because a face of the object facing to the sun (directional light) is much brighter than a face facing away from the sun, although both faces are completely shadowed.
I would like to render the scene first with only directional light (and apply shadows with intensity 1.0) and render the scene afterwards with only ambient light (without shadow). The sum of both passes would be the correct, final result.