Sign in to follow this  
winsrp

how do I blur shadows? from shadow maps.

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
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: [url="http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/soft-edged-shadows-r2193"]http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/soft-edged-shadows-r2193[/url]

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this