Shadows are unstable

Hi, I have a problem with shadows in my project. Problem is:

  1. Shadow sometimes turn off and on depending on the camera rotation
  2. Sometimes shadows turn off completely in EDITOR until I restart it

Here is a video showing the first problem:

Problem 1 is the same in editor and standalone build. I’m using deferred rendering, HDR, soft shadows… I have tried with multiple systems with different hardware and different Windows (10 and 7) and the problem is always there. My Unity is 5.2.2 and the problem was with 5.2.1 also.

Maybe is bug or I’m just doing something stupid? I have tried to tweak my directional light, camera and quality settings, does not help at all.

Problem 2 is not so important but only annoying.

I did some test in a different pc and found out that display resolution has something to do with these shadow problems.

In 1920x1080 the shadows were gone forever…

In 1280x720 the shadows were back but they disappeared in certain camera angles like in the video above…

I will try to isolate this behaviour in a simple test scene and will do a bug repport.

I found the problem: if a terrain has “Casts shadows” checked the shadows in the whole scene work correctly. But if I untick it, all shadows go crazy, and I can reproduce this in a simple test scene. Will do a bug report.