Im trying to create the body of my character with transparency while keeping the eyes on top but the transparent shader looks like if it was on top of the materials array (Element 0 is the skin and Element 1 is the eyes).
Im using toony colors with modifications to enable transparency.
Why does this happen?
The order of the materials on an object has nothing to do with the order they render to the screen. The order they render is set by the material’s queue, the sort order of the renderer component, and the distance from the camera to each sub mesh’s center. A single mesh might for multiple reasons get broken up into multiple sub meshes by the editor which get treated completely separately by the renderer, and one of those reasons is multiple materials. Each sub mesh gets a single material. The result is that while the editor side treats it as a single mesh for ease of use, the rendering side just sees a bunch of unrelated meshes that it sorts and renders in the order it thinks will be most efficient.
What does mean for you? Well if you can describe the issue you’re having and the result you want better we can see about helping you. Images are especially useful.
Hello thank you for your answer, after playing with the queue tag I finally got the result I want after changing the queue tag in the cutout shader for “Transparent+1”, it seems that unity doesn’t automatically reprocess the shaders after updating them in code so after switching the cutout shader for another one and switching back the queue tag worked.