Search Unity

Downsides of DrawInstanced?

Discussion in 'World Building' started by LesBloom, Sep 18, 2019.

  1. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    167
    Hello,

    I just switched my Terrain to use DrawInstanced. So far, I can't find any artifacts. I have searched and searched for issues to look for. I found some reports of build vs editor issues, but my builds seem to be fine.

    My questions:

    1) What are the artifacts / side effects I should be looking out for?
    2) Why isn't it on by default?

    Thank you
     
    EirikWahl likes this.
  2. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    I am not sure why it's off by default. I think the changes were done at a different time but then never got merged into source.

    As far as downsides/artifacts, some GPUs might not support vertex texture fetching ( like on some old mobile phones ) so the instancing wont work there. You also might find that the shader doesn't get included in builds but maybe that was fixed.
     
  3. LesBloom

    LesBloom

    Joined:
    Feb 2, 2017
    Posts:
    167
    Thank you for that information.

    I had read about the shader issue, but my builds are working great. I presume that was fixed.

    I am not sure if this vertex texture fetching will impact me or not. I am only building for PC at the moment. So, I guess not?
     
  4. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    You should be fine then
     
    LesBloom likes this.