Search Unity

Line Renderer Draw Calls

Discussion in 'General Graphics' started by Cypras, May 20, 2016.

  1. Cypras

    Cypras

    Joined:
    Oct 25, 2013
    Posts:
    64
    Hi,

    Using Unity 5.3.5f1 and by looking at my profiler. Clearly the draw calls are not batching for these line renderers. Am I missing something?

    See attachments.

    Thanks
     

    Attached Files:

  2. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Line renderer just sucks and doesn't batch.
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,299
    The line renderer does batch. Try using the frame grabber and see if its drawing with a single call or multiple.
    Are you using the same material on the lines?

    Those screenshots show batching working. The total batches count is 2 in all.
     
    richardkettlewell likes this.
  4. iivo_k

    iivo_k

    Joined:
    Jan 28, 2013
    Posts:
    314
    Oh, used to be it didn't batch. I still maintain it sucks though (due to the simplistic corner handling). :p
     
    Last edited: May 24, 2016
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    The batching reporting is a bit broken here. As Karl says, batching is working and "Total Batches: 2" is telling you that.
    However, the line beginning "(Dynamic Batching)" is failing to report the details. We have fixed this in 5.4.
     
    fffMalzbier and karl_jones like this.
  6. Cypras

    Cypras

    Joined:
    Oct 25, 2013
    Posts:
    64
    Yes they all use the same material.

    Cool, thanks a bunch.