Hello,
I might me overlooking something but I am not able to specify the draw order of meshes writing into the custom depth buffer with different stencil values. I am not interested in sorting them based on distance from the camera so they have the same ‘Z’ coordinates.
Is this even possible? I am using translucent materials. Everything works fine and I get the expected results if the meshes don’t write into the custom depth buffer, but as soon as they do, the ‘TranslucentSortPriority’ setting seems to get ignored and the random winner of the Z-fight will be rendered on top. Moving one of the meshes a few units up on the ‘Z’ axis fixes the issue, but it isn’t an ideal solution.
Any help would be appreciated.