Hi guys, again!
One issue that I never fixed and cared about, until today, was a problem occurring when blurring the shadow map. As you know, shadow maps have a resolution, and that affects their precision, and as you can't have unlimited precision in shadow maps, you will get some artifacts, like the stair effect. One of the suggested ways to fix this, or cover it, is to do the following:
- Render the scene with lighting to a render target
- Blur the render target x times to a resource
- Sample the new resource on top of the current color, like: color *= lighting
But, when doing this, some artifacts occur, at least for me. So if you imagine a cube, which is pretty dark, and then a large plane just under it which is fully lit. When blurring this image, some of the white from the plane (in the lighting map) will be smoothed to the cube, and then in the final image it may appear as the edges of the cube to be slightly lit, which is wrong and looks terrible.
How should I tackle this problem? Am I using a wrong method?
Thanks, as usual!