4
\$\begingroup\$

I've implemented an omni-directional shadow map and I've noticed a rather unwanted behaviour on the shadows. It seems like when the angle between the occluded points and the light source is really steap, then the egde of the shadow starts to wobble. It's almost looks like it's pulsating.

Could it have something to do with when the light source moves further away from the occluded polygons, the pixels next to each other are further away from each other than the corresponding texels on the shadow map face that I sample from which result in some sort of magnification side-effect when performing aliasing? This is just a really wild guess!

Is anyone familiar with this type of behaviour and/or have any solution to it?

Thank you!

\$\endgroup\$
4
  • \$\begingroup\$ Can you post your shaders and any relevant C++ code? \$\endgroup\$
    – Honeybunch
    Aug 6, 2015 at 20:41
  • \$\begingroup\$ In some type of shadowmapping you want to move shadowmap in 1 texel steps (so the texel positions dont change WRT the world). Probably only works for directional lights though. Try applying smoothing/filtering to blur out the shadow edges (or increasing resolution) \$\endgroup\$
    – Waterlimon
    Aug 6, 2015 at 23:06
  • \$\begingroup\$ an image would be much better, or a gif (lol). but usually this is called "temporal aliasing" and this is inevitable. Particularly with non orthographic shadows ! with orthographic shadows you can do texel clamping on the steps the shadow camera is allowed to take in world space. But on perspective shadows its game over. You can however implement PCF and it won't show. \$\endgroup\$
    – v.oddou
    Aug 7, 2015 at 2:01
  • \$\begingroup\$ Sounds like the typical problem of standard shadow map with step angles ... Look into GL_POLYGON_OFFSET mode which will offset your depth map based on the angle of the view matrix. This way you won't have fighting. If this is not the problem, try to increase resolution of your shadow map. If it is too expensive, use Cascading Shadow Map. \$\endgroup\$ Jul 28, 2017 at 16:55

0

You must log in to answer this question.

Browse other questions tagged .