I have several game objects that I am controlling the transparency of by adjusting their alpha channel. These objects are masking each other, for lack of a better description. They both have the Transparent/Diffuse shader applied. What do I need to do to fix this? I’m guessing I’ll need to modify the OOTB shader. Thanks.
(uploading pictures hasn’t been working for me?)
The issue with overlapping Transparent shaders is that there’s no depth sorting. I think one fix is to get Transparent/Diffuse to render the same pass twice. Alternatively you can use “Transparent/Cutout/Diffuse” or if don’t want the hard cutoff edges try “Transparent/Cutout/Soft Edge Unlit”
“Transparent/Cutout/Diffuse” works, but I need partial transparency. I could just as easily disable the renderer. And ‘Transparent/Cutout/Soft Edge Unlit’ causes the same problems. This used to work, what happened? When will there be a fix? Are there any custom shaders that will work? Thanks for your reply.
I’m having a hard time with this. It worked in 3.x, i’m sure of it. I just checked some standalone builds. I have multiple transparent materials stacked without any polygon problems. I’ll load them up when I get home and see how they are set up.
Upon further investigation, I’ve discovered that the reason I hadn’t experienced any problems was because the elements were always at least semi-transparent. At no times were the elements set to opaque with a transparent shader. I ALWAYS wanted to see through them. My problem today was caused when I attacked an opacity slider to an object. And I could see every other transparent element through it. What a downer!!
This isn’t something that’s recently broken. It’s an issue with transparencies in all real-time 3D on all platforms.
The objects are drawn back-to-front, based on their distance to camera. Within the same object, it’s probably going off triangle indices, so if you can build your object such that triangles are made in exactly the order you want them to be rendered, you might get the effect you’re after. So if it worked before it was sheer luck.