When I have 2 different transparent materials, one in front of the other, i’m having terrible clipping problems. I originally thought it was a shader problem (it may still be) but I’ve found other people having the same problem. Independently they work fine, put one in front of the other and it’s a mess.
Another thread I read said it could be fixed by overriding the render queue. Well in this case i’m trying to make the ceilings and floors of a multi-story building transparent. So if you were on the 2nd floor looking down, the floor would have to render first, looking up the ceiling first. The floors and ceilings are each one mesh.
What is wrong and how can I fix it? Thanks.
It turns out I’ve had this problem all along, I just hadn’t noticed it because I’ve never tried to set an element with a transparent shader to fully opaque. I was using a slider to adjust transparency. I solved this by switching the shader as soon as the slider was pulled, and then the objects were supposed to be seen through.
This is a limitation with the way transparent materials are typically rendered and sorted. There are ways around it, but can impact performance, require specific scene setup or introduce other rendering issues.
It’s not specific to Unity (if you look carefully you can often spot multiple transparency issues in modern console games) but you’re on the right track as far as switching to a non-transparent shader when objects turn opaque.