Problem with deferred rendering real time shadows.

Hello.

Since some time we have serious problem with the real time shadows in Unity 3.3 Pro (stupid mistake! We are using Unity 3.3… not 3.2). It manifests like this:

  1. There are simply no more real time shadows for directional and spotlights when using deferred rendering. In any scene in our main project. (They did work for the longest time. They still do appear as baked shadows. I can’t really say, when we lost them, but I suspect it happened with our upgrade to 3.2)

  2. Strange blending artifacts appear when we combine our (directional) lights with beast light maps.

Take a look at the following screenshot. It’s a scene with a directional light, casting soft shadows on a terrain (random texture) with baked dual lightmaps. I took the screenshots while zooming out with the camera. Look at the strange bright border with the stepped, sharp edges. It appears approx. in the region where real time lighting and the baked light map should blend.

As you can see, there are still shadows in the baked light map, but none in the real time region. This is really troublesome and I ran out of ideas on how to fix it. :frowning:
Any ideas?

Thank you!

I have the same problem the only thing i get to cast shadows is trees

I can confirm that problem, it’s since 3.2. However in a new project the shadows work, even in scenes copied from the old project.
Maybe some hidden settings have changed?

increase the shadow distance perhaps?

I am so glad I didn’t update since 3.1 :smile: :smile: :smile:

Hi there! Thank you for all the replies. I just mailed the above screen to the Unity Support. Hopefully they’ll be able to tell me more (in five work days… ). If it’s a known thing… fingers crossed

In the mean time @Frank:
I already tried re-baking the maps and increasing or decreasing the shadow distance. The latter simply moves the bright patches of terrain closer or further away from the camera.

Mh… problem with the support: They want to take a look at our project, which is unfortunately a little to big to send by mail. :wink: Has one of the guys who have the same error in their projects maybe already sent a bug report?

Copy your project and cut out all the excess, they’ll only want to see the problem part in question.

Mh. Very good idea! I’ll do that

Small update on the way: I downsized the project and sent it to the support and in the process noticed, that the shadows start working again, if I delete the library/cache directory inside the Unity project. Unfortunately, this also destroys a lot of links between assets inside of the project… :frowning:

if that happens, a fullscale reimport should potentially work too

Well… I have the same problem. I’ve stripped the project down and uploaded it to the support using the bug reporter… I’ve been messing around with this for quite some time.

gosh… found the bugger 2 minutes after upload… somehow the shadow type of all lights have been disabled…

And here comes another update!

Unity Support answered: We included the standard asset shaders some time ago in our project (http://unity3d.com/support/resources/assets/built-in-shaders) which - as it seems - caused errors with the updated render functionality in Unity 3.3. I simply removed the whole folder and now reached msborat’s point: Realtime shadows work only with the foliage and vertex lit shaders… :-S

But at least the light/shadow blending problems are gone.

@dreamora: sounds risky, but I’ll keep it in mind, if I run out of options again - thanks.
@metron: gosh, I wish I’d find an option like that too :wink:

Problem solved!

I posted our answer at the unity answers forum:
http://answers.unity3d.com/questions/45121/problem-with-deferred-rendering-real-time-shadows/46790#46790

Thank you very much!