Search Unity

RenderMesh sorting problems when swapping materials.

Discussion in 'Graphics for ECS' started by zanius, Apr 16, 2019.

  1. zanius

    zanius

    Joined:
    Feb 5, 2018
    Posts:
    24
    I have a very rudimentary animation where I'm swapping out between two materials on the same RenderMesh. One of the materials appears correctly ordered (in this case it's supposed to render between 2 other objects). However, when I swap to the other material it always appears behind all of the other meshes. I tried duplicating the material and simply swapping out the texture in the editor so the materials were completely equivalent but it still didn't work. I used the exact same texture for both materials to see if it would work and I still had the same problem. I just can't figure out why simply swapping back and forth would make one render on the wrong layer.