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

GPU Instancing works strange on android

Discussion in 'General Graphics' started by th0m4sXD, Nov 8, 2018.

  1. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    As you can see on the picture on pc (in the editor) amount of draw calls for gpu instanced objects are 2 (2 different meshes) but on android each instance produce another draw call. why? androidStats.png
     

    Attached Files:

  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,040
    Check the frame debugger, it should say, what's the reason for not batching objects together.
     
  3. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    The frame debugger says "rendering different meshes or submeshes with gpu instancing"
     
    Last edited: Nov 9, 2018
  4. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    I created a new empty project with few objects which share same mesh and material with gpu instancing enabled and result is the same.
     
    Last edited: Nov 9, 2018
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,040
    Please submit a bug report then.
     
  6. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    Last edited: Nov 9, 2018
  7. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    i updated unity to newer version and now the reason for breaking batch is "the previous instanced draw call has reached it maximum instance count"
     
  8. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    I’ve added our internal explanation to this issue tracker ticket so you can see it. It sounds like that bug was quite specific to the repro project that user supplied. If you think it doesn’t sound like your issue, logging your own bug might still be the way to go.

    Although maybe the message in the newer unity makes it all make sense to you, i dunno :)
     
  9. th0m4sXD

    th0m4sXD

    Joined:
    Oct 22, 2017
    Posts:
    9
    Thanks for explanation the reason of this bug, but actually i have different one, my editor quality and android build quality are the same. I'll log my bug to issue tracker soon.
     
    Last edited: Nov 10, 2018
    richardkettlewell likes this.