Recently while searching of solving the shadow acne problem of traditional shadow mapping I implemented exponential shadow maps. It did the trick (no acne at all) but at the same time introduced other unacceptable errors.
For depth map blur I use gaussian blur with smallest sigma=1.
Test for shadow map:
float occluder = texture(shadowMap lightCoords.xy).r;
float c = 5000.0;
float receiver = lightCoords.z;
float shadow = exp(c*(occluder-receiver));
shadow = clamp(shadow, 0.0, 1.0);
with small c factor c=100.0
:
Unacceptable light bleeding
with high c factor c=5000.0
:
No light bleeding but high frequency detail appear "swollen".
Cant find optimal c - light bleeding appear even at c=3000.0
and high frequency shadow error is already there. Not blurring the depth map helps but then aliasing occurs.
And my question is - how can I improve this technique (ESM) or should I look for another? I think good quality shadows with nice performance are definitely possible - as seen in modern games like Witcher 3 or Fallout 4.