- Home /
What's the difference in z sorting transparent vs diffuse
I have a scene with two mesh renderers showing an arrow each. They are childed to an empty gameobject at their bottom and are tilted so they are slightly pointing towards the camera so they can be sorted depending on their z-order. If one overlaps the other, it should be above, and vice versa.
Probem:
When using the default diffuse shader, they clip through each other when overlapping. That's what I was expecting. But when using the default unlit/transparent shader, that's all gone. One arrow is always completely above the other.
Is there an easy way to get the same behaviour with transparency?
I don't think so unless you play around with the shader. What's the problem with changing the z coordinate?
We would need to sort a large amount of the meshes to adjust their z order. I wanted to avoid the whole sorting by just tilting all meshes against the camera so they would correctly overlap the roots with their tips. Like roof tiles.