- Home /
Render texture above something else
In my scene I have a 3D phone with a video on the screen (and overlapping the sides) which has a chroma key shader on it: https://www.assetstore.unity3d.com/en/#!/content/15172
The keying works great but I get some serious Z-battling with the phone underneath, despite the plane being clearly in front of the 3D phone. It gets worse the further you move away from it.
I've tried to change the 'Tags' so that Transparency is +1 (I've tested up to +4) but with no change.
The phone was originally textured with Standard shaders but I've also tested with Mobile/Diffuse, all to no avail.
Can anyone tell me why this is happening and how to fix it?
Yeah, it can happen and if both objects are rendered by the same camera, I tink there's not much that can be done about it. Try rendering one of the objects by a seperate camera with a higher/lower rendering depth, if that's an option.
Answer by Bigiansen · Aug 19, 2016 at 06:23 AM
Render your "chroma" stuff onto another camera and set the depth to a different value than the main camera.