Transparent objects disappear near upper right corner

Anyone know why my transparent planes would start to disappear near the upper right corner of the screen? I’ve played with the far clipping plane and I’ve tried a bunch of different shaders (all have the same issue).

here is a gif of the problem:

and here is an image of the planes. There are about 6 or 7 transparent planes ontop of eachother for each tile, quite a lot. But they don’t disappear at a top-down angle, or a reverse angle (aiming from the other side)


edit: additionally, the mesh underneath, the water mesh, is one large generated piece. This seems to be whats causing the issue. Heres the final code for the water mesh:

        Mesh waterMesh = currentChunkTransparentDraft.ToMesh(ignoreNormals: true, ignoreUv: true);

maybe I need to break it into smaller chunks?


You’re not going to like it. Search for “Transparent object sorting” for more information.

OK, off the top of my head, here’s the deal.

Transparent objects have to be sorted and are applied after all the opaque objects in a separate rendering pass since the “background” has to be there first to mix the colors. And order matters. So far so good, right?

But how does it sort these objects? IIRC, it sorts them by the bounding-box-center (not even the mesh origin). There’s the rub. Your water object (or the other big object) has a center closer at times than the center of the planes but as you move your camera, the relative distances between objects and the camera change. This changes the sort.

What I ended up doing with a water object was to move the object’s geographic center off shore, so things like particle effects and such that were “on land” get sorted as being closer than the water. Now IDK about your specific setup. And your perspective may be a bit different so it may not work for you, you might have to get clever and find another solution. Maybe you have to move the “mesh under the water mesh”. IDK. But you get the idea. All opaque renders first, front to back. All transparent next, back to front.

Anyway, do that search and see what you come up with that’s applicable to your exact use-case (I’m not sure of your camera restrictions, for example).

Also see documentation about Unity - Scripting API: TransparencySortMode
How do i change the Render Queue ? - Questions & Answers - Unity Discussions

THANK YOU for this answer. I’ve been making some assets with two transparent images stacked on each other and it was getting weird transparency sorting issues, and I was like ‘One’s above the other, this should be working!!’ then based on your answer I went and checked the pivot point of my objects, and sure enough the topmost object’s pivot was below the bottom object. Such a simple thing that I wouldn’t even think of.
I hope you have a great week!