vsm artifacts

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 :frowning:

btw i’m using 16bit floating point fbo’s.

AFAIK this light bleeding is a known problem with variance shadown maps.

[ www.trenki.net | vector_math (3d math library) | software renderer ]

yeah i know but has noone found a solution (or at least a hack) for this yet?

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! :smiley:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.