Sorting not correct in URP forwarded rendering Unity
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)?
@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.
@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.
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.