I’ve been working on porting a flight sim game developed in Unity 4 to Unity 5 / 5.1. I’ve been encountering numerous rendering issues, starting to feel like I’m going crazy here. Feels like Unity just decided to cut the precision of floats in half… Everything worked fantastic in Unity 4, no problems.
Seeing lots of z-fighting between parts of the planes. Seeing a lot of shadow flickering on the surface of various objects. Appears to be surfaces casting shadows upon themselves, then z-fighting with themselves. This starts to show itself around 1000 - 3000 units from the origin, getting progressively worse. The z-fighting and shadow flickering seems to be mostly mitigated by implementing a floating origin (which was not required before), however I’m still seeing serious shadow flickering on a few (but not all) Android devices. Can’t seem to fix that issue on Android no matter what, short of disabling shadows.
A large water plane (60,000 x 60,000) is getting cut off by the near clip plane of a camera (set at 0.7) on a Galaxy Tab, but works fine on most devices. Dropping the size of the plane fixes the issue but visually makes it useless as a water plane.
Also seeing an issue where the seam between our near and far cameras leaves a noticeable gap in the geometry, seeming to get much worse the further away you get from the origin. The near camera’s far clip plane is set to the same value as the near clip plane for the far camera. If the clip planes overlap, I think it resolves the issue, yet it worked fine as is in Unity 4. I can’t remember the exact numbers but i believe the overlap had to be non-trivial, a 0.1 overlap didn’t always fix it if I remember correctly.
It has been costing me a lot of work finding, and trying to fix these issues. Am I crazy here or is anybody else seeing similar things? Did I do something wrong somewhere along the lines? Are these bugs, or just the new way of life in Unity 5? I’ve tried toggling every Unity setting I can find, but no luck. I submitted a bug report about the z-fighting/shadows as distance from the origin increases and got a response back… “This is a known issue and for now it is not going to be fixed.” That’s not cool… They suggested a floating origin. Part of me wonders if I just got a canned response back because obviously a floating origin is required if you move too far away - not sure if they realize how little distance it takes now versus Unity 4. Also submitted a bug on the Android shadow issues but have yet to hear back.
Should I just keep on going and trying to come up with work-arounds for these issues, or would it be too much to hope for some patch fixes in the not too distant future?
Thanks.
EDIT: Here are some screenshots/videos of some of the issues
Shadow flickering
Shadow flickering / z-fighting
Camera seam issue
Android shadow issue