I was under the impression that using DrawMeshNow gives me complete control over the order of draw call submissions in Unity. After a gazillion hours of debug, I’ve realized that isn’t the case.
I call DrawMeshNow from OnPostRender (and not OnRenderObject because Blit doesn’t work right with the latter).
My shader originally had Tag = “Transparent”, and I thought that was the problem. Didn’t fix it. Removed the blend state in my shader. Didn’t fix it. Recreated the material (to avoid stale stuff from the previous one) – no luck.
Unity doesn’t just reverse the order. That’d be easy to work around. I’ve seen (using Intel GPA) my submitted order of 1,2,3 being rendered as 3,1,2.
I tried setting the tag to various layers (opaque, geometry, transparent, overlay) and still they get reordered.
I’m clueless on how to go about fixing it. Someone, anyone… please help me!