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?
how do I blur shadows? from shadow maps.
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.
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
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
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.!!
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.!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement