Search Unity

Why would you not have GPU instancing on?

Discussion in 'General Graphics' started by SamohtVII, Aug 13, 2019.

  1. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    318
    I am trying to optimise my game and came across GPU instancing which seems perfect for my trees in game. I am going to turn GPU instancing on for all of them but why would such a feature not be on by default and never be turned off? I haven't found the downside to it.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    8,243
    It has been discussed before. It has overhead, it might make performance worse, it depends, profile your game.
     
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,664
    Have you a link to that?

    I know Static and Dynamic batching both have pros and cons, but I'm yet to see cons for GPU Instances.
     
  4. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    318
  5. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    11,039
    Instancing has some additional fixed costs associated with it, both on the CPU and GPU. For a small number of objects it's potentially more expensive to use instancing vs even just drawing each individually.
     
unityunity