Realtime soft shadows with deferred lighting

Hi,

I’m using realtime shadows with deferred lighting.

How come I can’t get soft shadows with the spot light like I can witht he directionnal light.

Thank you

h20

bump

Just tried to see and… you’re right, no shadows with spot lights in deferred.
But only in the editor, if I play the scene shadows are there :smile: :smile: :smile:

no i also have it in the editor

what i don’t have is SOFT shadows, it’s only rendering hard

Spotlights and soft shadows work fine for me in both. v3.2

could you please port a screenshot
also in deferred lighting the gradient effect isn’t as smooth as in forward, if that makes any sense
thank you

Tip: Use lower res shadows and change the bias, spotlight angle and shadow distance.


Fine tuned, low res shadow


Small angle, high res shadow


Wide angle, low res shadow

ok thank you for investing your time into these pictures. I will look more into it and fine tweak things

I think also the problem in deferred lighting is that there is no AA so my shadows are completely jagged

That wont make a difference for soft shadows though, only hard ones, and even then I don’t know if AA bothers with shadow edges in Forward either. Besides, the above examples are Deferred, so yours wouldn’t look any different unless you’ve got an older GPU than me (and that’s unlikely, cause mine’s an old one, lol). I don’t have some secret Unity 3.4 version with magic Deferred AA, just regular 3.2 Pro.

Unity shadows are just fine, they need a bit of tweaking to get right is all. They wont look perfect on flat untextured surfaces, but then most realtime soft shadows don’t look great in those cases. Once things are textured nicely, the shadows look great.

Here is an image. Tell me if this is right

Thanx

Yup, it’s getting there. Fine tune the spotlight angle, try different shadow resolutions, and be sure to bring the shadow distance RIGHT down (file menu/preferences/quality) to the shortest distance you can comfortably have. The shorter the distance, the less area the shadow map has to be used across, which improves quality. Dual Lightmaps help a lot by taking care of the shadows further away and let you use the whole shadow map close up.

I didn’t find this shadow distance quality thing you are talking about in

file menu/preferences/quality

are you talking about project settings > quality?

Yeah sorry, was only half paying attention when I wrote it, Holly Willoughby was on TV. My bad. :slight_smile: