Search Unity

Feedback Sorting layer and Graphics.DrawMesh

Discussion in 'General Graphics' started by arkano22, Dec 15, 2021.

  1. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,929
    Hi there,

    This has been a long standing problem imho: built-in Renderers in Unity allow you to set a sorting layer/order. However, Graphics.DrawMesh doesn't, and this effectively prevents anyone from writing a custom renderer that correctly honors sorting. This is specially an issue for 2D games.

    As far as my understanding of rendering pipelines go, DrawMesh queues a command so the pipeline renders the mesh at the appropriate point during the frame. This should be as simple as inserting the command at a specific place depending on the sort settings.

    What's the status of this? Is this limitation unsurmountable, or is it planned to do something about it in the future?

    Thanks!