#Is the render order guaranteed in `Graphics.DrawMeshInstancedIndirect()`?

1 messages · Page 1 of 1 (latest)

fierce blade
#

I'm currently working on drawing a large number of 2D transparent sprites in Unity. When using Graphics.DrawMeshInstancedIndirect() or Graphics.DrawMeshInstanced(), is it guaranteed that alpha blending will be done in the order of SV_InstanceID/UNITY_VERTEX_INPUT_INSTANCE_ID? I've verified that it's drawn in the desired render order in both the Editor, Windows builds, and Android builds. Is this just a coincidence, or is it defined in the specification?

#

There are 16,000,000 instances of red and cyan transparent square sprites in total, and I cannot find the row where the left-front/right-back rule is broken.

potent hound
#

The order of blending the fragments should respect the instances ordering normally, so yes.