Shadow setZExtends black after limit

Well I have some aceptable quality lightmaps and want to use them at anything further away than 150meters.

(Use a shader that removes them nearer gradiently)

Now I want to use the pssm with it for the moment, and it has the setZExtends method that lets me say no shadows after 150meters, use all resolution to increase the nearer ones, that is great.

However After the spefified distance everything is renderd as in shadows, not as no shadows at all, is there a way to inverse that behaviour, so I can use my own Shadows after thatdistance? Or do I need to modify the shadows materials myself?

uh…no that’s a bug.

I’ll look into it.

It’s fixed in last SVN

(along with the javadoc fix you posted for the PssmShadowFilter)

Thanks.

2 Likes

Works great, thank you.



One thing i think about, how would it be to let specify a shadow fadeout distance?

Cause i get the feeling if i could fade out the dynamic shadows a bit, there would be no visible seam at all

it would have to be done in the post shader i guess.

Ok i will take alook at :wink:

I had that working on my local copy.

I’m gonna make it available through a pram on the renderer and use a define in the shaders.

Then i’ll commit.

ok i committed the change now you can use setShadowZFadeLength(aValue) that is the length on which the fade should extend.



for example you have a Zextend of 300 and set a fadeLength to 50 then the shadows will fade out from 250 to 300 world unit from the camera.

the effect is quite nice actually and it could even be used without baked shadows. it’s far from natural, but it can come unnoticed and save a lot bunch of rendering time.



here is a shot with the pssmTest

http://i.imgur.com/aIHS1.jpg

1 Like

Cool, this is really great :wink: