Trasparency Not Rendered Properly for Some View Directions

The transparency in reality kit is not rendered properly from specific ordinal axes. It seems like it is a depth sorting issue where it is rejecting some transparent surfaces when it should not. Some view directions relative to specific ordinal axes are fine. I have not narrowed down which specific axes is the problem. This is true across particle systems and/or meshes. It is very easy to replicate this issues using multiple transparent meshes or particle systems.

In the above gif you can see the problem in multiple instances, the fire and snow particles are sorted behind the terrain, which has transparency since it is a procedural blend of grass, rock, and ice, but it is correctly sorted in front of the opaque materials such the rocks and wood.

In the above gif, it is two back to back grid meshes (since dual sided rendering is not supported) that have a custom surface shader to animate the mesh in a wave and also apply transperency. You can see in the distance, where the transparency seems to be rendered/overlapped correctely, but at the overlap approaches the screen (and crosses an ordinal axes) it renders black for the transparent portion of the surface, when the green of the mesh that is behind should be rendered.

This is a blocking problem for the development of this demo.

I've been really burning a lot of time on this as well. I've tried sort groups, but they're not viable because the ordering isn't always going to be the same if the user is moving around in the space. To add some detail to the issue, I've noticed this is most pronounced when multiple objects with transparency are layered on one another. In other words, if you have a single tree imposter (a flat plane with a tree textured onto it and an opacity map) it will overlay onto a background properly. However, if there's a second tree imposter, and the two objects overlap visually, RealityKit will eventually skip drawing one of them rather than drawing all transparent objects.

I have also encountered this issue with transparent objects that contain nested transparent objects - from some angles the interior objects seemingly vanish for no reason. Blocking issue.

I'm also struggling with this, but I have noticed that using the opacity threshold helps. I read somewhere that this is related to depth sorting and that the render engine doesn't understand how to sort each layer correctly.

I have a similar problem. I have a particle effect that is contained within an object that is semi opaque (it looks like glass) The particles are flashing in and out. Once I get through the glass it all works ok.

I filed a feedback to the RealityKit team explaining my issue: FB14285128

Got here while trying to figure out why my entity disappears the moment I lower its opacity (for now on iOS). I have outer entity that's semitransparent and while the inner one is opaque - everything's fine. The moment I make the inner one's opacity <1 - it disappears. And I was planning on putting a third opaque one inside the second :)

Trasparency Not Rendered Properly for Some View Directions
 
 
Q