Search Unity

Resolved DrawMeshInstancedIndirect vs DrawMeshInstancedProcedural performance

Discussion in 'General Graphics' started by Afropenguinn, Jun 22, 2020.

  1. Afropenguinn

    Afropenguinn

    Joined:
    May 15, 2013
    Posts:
    305
    Been googling around but I can't seem to find a whole lot of examples or information on DrawMeshInstancedProcedural. I'm playing around with DOTS trying to see if I can get a massive number of sprites rendering, and most examples I come across use DrawMeshInstancedIndirect. Is there any particular reason for that? Is it faster, more flexible? Is DrawMeshInstancedProcedural more CPU heavy since it doesn't use ComputeBuffers? If anyone could shed some light on this I'm really curious.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    The only difference is for “procedural” the script must know the draw numbers. For indirect, they can live on the gpu in a ComputeBuffer.

    Performance should be more-or-less identical.
     
  3. NikosPetr

    NikosPetr

    Joined:
    Nov 15, 2016
    Posts:
    4