Page 1 of 1

Tex.Shadows blur

Posted: Tue Apr 26, 2005 5:52 pm
by NeoPain
Is there some way to make texture shadows more BLURed?

Posted: Wed Apr 27, 2005 10:51 am
by arcane
At a guess, a no-loss-in-performance (but average looking) method would be to simply lower the resolution of the texture generated.

Posted: Wed Apr 27, 2005 12:06 pm
by NeoPain
Actualy shadows casted from spotlights are SUPERB! But casted from directional lights.......uhh :( . Just make and application with animated model that cast shadows to plane and directional light......and you'll see what i'm talking about. They are not preety enough imho.

Posted: Wed Apr 27, 2005 4:38 pm
by batonrye
there is some linear filtering when a shadow map is generated - so lower resolutions will look more blurry (though likely more blocky as well)

here is a method that renders the shadows to screen space and applies a gaussian filter before combining it with the full lit scene. i think the result is quite good...

how to implement this i'm not sure - not to familiar with pixel shaders yet

Posted: Wed Apr 27, 2005 5:39 pm
by sinbad
Directional light shadows are blockier because the render to shadow texture has to cover a larger area - basically everything your eye can see - whilst the spotlight only renders the area in the spot so has more texture resolution to play with. The directional light render adjusts as best it can but there are limits. You can improve the quality by shortening the shadow far distance, increasing the texture size, and playing with other shadow parameters - see the API docs.

If you want to post-filter the texture shadows with shaders you can, you are able to specify custom shadow caster materials and custom shadow receiver materials if you like. These are obviously more expensive.

Posted: Thu Apr 28, 2005 2:10 pm
by NeoPain
Thank you!