i’ve implemented variance shadow mapping, but there are still some artifacts: when two or more occluders overlap, there is no shadow. these artifacts only appear if i filter the texture bilinear and/or apply a gaussian blur.
vsm with linear filtering, no artifacts:
vsm with linear filtering and gaussian blur:
the vsm code is 1:1 copied from the original paper (www.punkuser.net/vsm). any ideas how to get rid of this? vsm is pretty pointless if you cannot filter the shadow maps
I spent some time on it, but never found a decent solution. It may be good for stuff where light bleeding isn’t very noticable (say for foliage). The best hack to get something semi-decent is to apply an s-curve function to the resulting shadow value, like shadow * shadow * (3.0 - 2.0 * shadow). This makes the artifacts less noticable, but also makes the shadow a bit less blurry for the amount of blur you applied to it.
hey that does help! if i apply that twice, i get rid of 90% of the artifacts! the shadows aren’t as blurry anymore, but still look very good. thank you very much!