• RuntimesUnity
  • Sorting not correct in URP forwarded rendering Unity

Harald Look at the image. the girl(upper) should show behind the other girl. It worked well in 2d renderer pipeline. But when I changed it to forward render pipeline, it happens

    Harald This is the material I'm using

    Director Look at the image. the girl(upper) should show behind the other girl. It worked well in 2d renderer pipeline. But when I changed it to forward render pipeline, it happens

    Thanks for the additional info. How is the object placed in the scene view in relation to the second one? Is it moved further away from the camera (in depth direction)?

      Harald Yes, it is further away from the camera

      @Director Could you then please send us a minimal Unity project that still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.

        Harald Thank you. I will

        Harald Hi, I've sent the minimal Unity project. Thank you

        @Director The problem is located in the ProjectSettings/GraphicsSettings.asset and is unrelated to Spine:

        ...
        m_TransparencySortMode: 3
        m_TransparencySortAxis: {x: 0, y: 1, z: 0}
        ..

        This seems to be a leftover setting of your initial 2D project, sorting by Y axis instead of by depth.
        If you change these two lines (using a text editor) to the following, it again sorts by the Z Axis (by depth) as desired:

        m_TransparencySortMode: 0
        m_TransparencySortAxis: {x: 0, y: 0, z: 1}

        This can be considered a bug in Unity, as the Transparency Sort Mode and Sort Axis settings are not displayed in the Project Settings window when using a URP renderer, but they still seem to be used. Please report this bug over at Unity, so that they can fix this issue in future updates.

          Harald Thank you so much. I changed the values in the GraphicsSettings.asset. It works😃

          Harald I have also reported this bug to Unity.

            bir yıl sonra

            Just want to say thank you Harald! This advice solved two days of headaches for me. And now I now for the future as well. Also reported to Unity. 🙂

            @nd_nomad Very glad to hear it helped, thanks for letting us know and for reporting it to Unity as well! 🙂