Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Difference between different draw methods?

Discussion in 'General Graphics' started by SuperFranTV, Oct 8, 2022.

  1. SuperFranTV


    Oct 18, 2015
    Hello, I would like to clarify what the differences are and which one offers the best performance?

    Assuming my project only needs 1 shader and 1 material but differend meshes, the game objects then use different settings on the material (material property blocks)

    My idea for a high-performance method would be to use as few SetPass calls and batches as possible and to send as little data as possible between CPU & GPU.

    Please correct me, if I am wrong.

    Why indirect methods? My knowledge says that such a higher number can be grouped into a batch.
    Indirect and procedural are equal in performance level.

    Now functions do not need a CPU readback and are therefore more effective?

    One feature is the difference in name, between Draw & Render, what does that mean?

    RenderMeshIndirect (300.000 Spheres = 13 FPS on my PC)

    DrawMeshInstancedProcedural (300.000 Sphere also 13 FPS)

    The CPU says 75ms and GPU is by 0,8ms, the profiler says:
    - Gfx.WaitForPresentOnGfxThread / Semaphore.WaitForSignal causes this
    i think that means CPU is waiting for the GPU?

    DrawProceduralIndirectNow (not tested now)
  2. DevDunk


    Feb 13, 2020
    Graphics code runs on a different CPU thread. It is telling your that that thread is being overloaded with the rendering, not the actual rendering on the GPU.
    If off, maybe enable graphics jobs.

    The fastest way is to bake the meshes into 1 big mesh so it's just 1 object. This only works if the objects move all at once however.

    Maybe simply enabling GPU instancing also will help. Then Unity devides the batches into draw calls itself