2 Camera (Clear Depth Only) issue

So I have this (kind of old, something like 4.6) project I got forced into updating. This wasn’t much of a problem until now, but it seems like the behaviour of Cameras has changed in the meantime.
I have 2 cameras, one rendering the players view, one for 3d objects used in the UI. They render at the same time, using Culling Mask and Depth to determin what should be drawn where (basically UI in front of game…). This used to work, but now it looks like what you see on the screenshot.

Important: This only happens on WinPhone Devices. In Editor and Android it shows just fine!


The “weird” areas are actually flickering.
I played with the variables, but nothing really works. What got me closest to what I had was setting the ClearFlag to Don’t Clear on the UI-Cam, but that resulted in the UI Elements to draw “in order” with the world-Elements, so although not really being close in world space, based on the distant to its rendering camera objects could appear in front of the ui elements.
Running on Version 5.4.3
Any hints on how to restore my old status?
Thanks,
Daniel

Did this use to work correctly in 4.6 on windows phone? Could you show a video of said flickering?

@Tautvydas-Zilys It did work correctly. Additionally I updated to the most recent release of Unity, no change.
You can see the issue here:

I believe we’ll need a repro project and a bug report in order to look at it and potentially fix it.

If you clear to solid color rather than just depth, does the issue go away?

First about your Question: Switching to solid color would stop the flickering, but then again the image of the main camera would get overlaid by the solid color, so that’s not an option.
A workaround: Setting the “overlay” camera to don’t clear and the far clip distance to be way behind the main cam. Like that the Skybox Clear of the camera would overlay the no clear of the overlay cam (at least thats how i explain it to myself :slight_smile: ). That gives me the result I want with a different approach.