UI image sorting trought depth/render queue?
Hi I am trying to change the rendering order from my UI images by using a shader. I tried to use the Z axis(a depth test) to determain which element gets drawn first. The problem is the ZTest On in my shader is not doing that? I don't understand why. Is there a way to bypass this. I also tried using the render queue, but however you cannot change the render queue of just 1 instance of a shader, it changes the queue from all instances of that shader.
The reason I try to do this is because I am using a grid layout group. I cannot simply make my Image the first sibling because it will change the layout.
Note: I would prefer solving this with a shader instad of moving around siblings because to my opinion this doesn't feel right. But all help is welcome!
Thanks in advance!