Have tested a modular mesh wall panel with windows. Created textures in ddo. When in Unity setting the standard shader, with rendering mode set to transparent and fade, parts of the metal panel become see through
when tested in Unity 2018.2.8f1 and 2018.3.6f1.
Albedo texture is a .png and has opacity information saved in alpha. for the alpha the windows are black/ rest of mesh is white. have tested other models also and seem to have the same issue. is this something I’m doing wrong or is this a bug in Unity? Rendering mode images
Sorry for necro post, but since my prob lem is the same I thought it would be better to write here.
As you can see on the following images, when using a transparent standard shader outlines of the back side of the mesh appears on the front size, it is just one mesh which is double sided:
If there is a workaround it would be really nice, I need to modify the alpha of the texture color to make the “wall” transparent to be able to show players too close to them.
I’ve searched the web and found nothing, if I’m missing something please let me know or if you have a solution.
PS: I’m a real noob with shader programming and I don’t know keywords and most of the things to change how a shader works, so I don’t even know how to program a shader to create a behaviour like the one I want for my walls
AlphaToMask On will poke tiny little holes into the object making it appear transparent but still render correctly in the opaque/alphatest queue. The visual style of the masked transparency may be undesired though
The behavior of alpha to coverage (AlphaToMask On) depends on the GPU / API in use, and if you have MSAA enabled or not. On some GPUs if you use a2c with out MSAA, nothing happens. On others it acts like alpha test with a cutoff threshold of 0.5, and on others it automatically dithers. Similarly on some GPUs if you use a2c with MSAA on, it gives you as many steps of “transparency” as MSAA samples, on others it automatically dithers on top of that to give the appearance of more steps, and in a small few nothing happens at all.
But, ignoring alpha to coverage, yes, dithered opacity is another option, but that requires a custom shader as Unity does not have one built in. So does using alpha to coverage since that’s also not a shader that’s offered by default.