Transparency issues between two instanced geo comps

So, I think I know what’s going on after reading through the transparency wiki, but I’m hoping I’m wrong.
Basically I have 2 geometry comps, both contain 2 instances of a plane. I’ve sorted the Z coordinate so that it’s rendering the instances in the order of furthest to nearest, as openGL transparency expects.

Both geometries look correct when viewed head on, properly composited. however if I rotate the camera so that some of the instances from geo B are over top of some of the instances of geo A, I get weird transparency clipping.

My understanding is that all of one geometries instances are rendered in one draw call, then all of the other geometries instances are rendered in a second draw call. which would explain the transparency issue.

I’d assume this means there’s nothing I can do about it though. Is this correct? Or is there a way to render transparent instances between multiple geometry comps successfully?

This is with out order independent transparency enabled by the way.

If I turn on order independent transparency, it looks better, but still has some of these overlap issues between A and B:

Pretty sure you are correct, all instances for one geo comp are rendered at once, so no way to interleave the rendering of instances of two geo comps for proper transparency.
In your simple example, looks like you could combine all your instances, but not sure if possible for your real world setup.

Thanks for the confirmation, I guess other engines tend to have backend ways of pooling the instances together into some larger pool for z sorting?

The case that prompted this thread was a situation where I had two very different types of instancing that both had transparency and were interleaved spatially.

My solution was to create a meta glsl shader, that combo’d the instance shading of A and B, with some if/else logic to hide the geometry that was not relevant to a particular instance sample.

very hacky, and only works in some scenarios, but worked in that case.