Dynamic shadows artifacts

With proper slope scaled depth bias filtering could be cheaper than it’s now. Filtering also could be optimized by using hardware bilinear comparision sampler where it is possible. Currently every sample is separately doing soft comparision.
Related code.



        // The standard comparison is SceneDepth < ShadowmapDepth
        // Using a soft transition based on depth difference
        // Offsets shadows a bit but reduces self shadowing artifacts considerably
        float TransitionScale = Settings.TransitionScale; //SoftTransitionScale.z;
        float ShadowFactor = saturate((ShadowmapDepth - Settings.SceneDepth) * TransitionScale + 1);