• Advertisement
Sign in to follow this  

how do I blur shadows? from shadow maps.

This topic is 1949 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I made shadows on my game, the terrain is not that large, and the shadows seem a little weird, I was thinking that I could blur them a little bit.

[attachment=11366:Tree test with shadow.png]

How could I accomplish that ? any code snippet I can take a look at?

Share this post


Link to post
Share on other sites
Advertisement
come on guys, anyone? blurring a shadow on the egdes? I bet lots of guys here know how to do it, please, share a bit of your all mighty knowledge.

Share this post


Link to post
Share on other sites
As for the strange lines in your map, I guess you have chosen a too small bias. You need to use a bias in the shadow map comparison to get around imprecision.

For blurring, try searching for PCF shadow maps, or try something like this: http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/soft-edged-shadows-r2193

Share this post


Link to post
Share on other sites
ah the knowledge has been shared, just what I was looking for!!

I do have chosen a small bias, I tried a larger one, but shadows started deattaching from tree bases, when the sun in move horizontal than vertical. the small lines is just the normals on the sides of my boxes (map is made out of cubes.)

Thanks a lot, I'll try to implement that.!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement