Tex.Shadows blur

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Tex.Shadows blur

Post by NeoPain »

Is there some way to make texture shadows more BLURed?

arcane
Gnoblar
Posts: 6
Joined: Fri Mar 12, 2004 2:24 am
Location: Victoria, Australia
Contact:

Post 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.

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post 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.

User avatar
batonrye
Halfling
Posts: 52
Joined: Sun Apr 17, 2005 8:37 pm
Location: Michigan, US
Contact:

Post 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

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post 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.

User avatar
NeoPain
Halfling
Posts: 42
Joined: Fri Mar 18, 2005 9:24 pm
Location: Ukraine, Uzhgorod
Contact:

Post by NeoPain »

Thank you!

Post Reply