I’ve noticed in my recent builds that when I enable hard shadows on a point light, all of the geometry in the scene goes a bit crazy. However, this only happens in Android.
Here’s a screenshot of the game running on Android with real time shadows disabled:
And here’s a screenshot of the game running on Android with real time shadows enabled:
As you can see, all of the geometry is completely messed up when hard shadows are enabled.
Things to note:
-
In the Unity editor (and on iOS), the real time shadows work completely fine.
-
I’ve been building this game for a while. In the past, the real-time shadows worked on Android completely fine. I’ve only noticed recently that they cause this glitch, as I haven’t turned the shadows on in a long time. So I’m unsure when this glitch started happening, but I can confirm that it did used to work OK at some point in the past.
-
This is on Unity 5.5b11, but I’ve also tried building in 5.3 and 5.4, and it has the same issue.
-
EDIT: After doing some more testing, I can confirm this problem doesn’t affect directional lights. A directional light in this scene with shadows set to “Hard” casts shadows properly, and it works OK. As soon as I switch it to a point light, it starts showing the same messed up geometry as in the picture.
Any ideas what’s wrong? Any suggestions on how I might fix this?
Thanks in advance.