Search Unity

Huge performance loss in Mesh.CreateVBO for dynamic meshes [ IOS ]

Discussion in 'iOS and tvOS' started by TrialByFun, Jan 9, 2012.

  1. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Cool! That answers it. Glad I spent the time making sure I kept that GC Alloc at Zero :)
     
    hippocoder likes this.
  2. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    I was doing a 7DFPS game last week, and saw this thread when I was trying to work out why my Meshes were rendering incredibly slowly (it was a different cause).

    ...but this week, doing some work on low-level OpenGL on iOS, I've been optimizing VBO's and remembered this thread. I wondered how Unity interacts with PVR chips for mesh VBOs - and whether the double-buffering technique here is effectively tricking Unity into doing the "circular VBO buffer" that Imagination recommends?

    (see below - and if so: it suggests that triple-buffering or more could help sometimes too. This is PVR only, but .. all current iOS devices, and some Android, are using PVR chips)

    Apologies if it's unrelated, but the Unity docs for Mesh performance say ... essentiallly nothing, so I'd rather guess wrong and be corrected, than sit in the dark :).

    http://withimagination.imgtec.com/i...rove-your-renderer-on-powervr-based-platforms
     
  3. Stephan-B

    Stephan-B

    Joined:
    Feb 23, 2011
    Posts:
    2,269
    Setting Mesh.Color32 is about 5X faster in Unity 4.2.1. Everything else however seems to perform about the same.

    I am curious as to where this performance boost comes from?
     
  4. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
    I have read with attention this post, but I am not sure why submitting a new triangle array should be slow. Uploading the index buffer should be way faster than changing vertices, am I right?
     
  5. BugKiller

    BugKiller

    Joined:
    May 8, 2014
    Posts:
    23
    Windows phone also has this problem.. Any fix for this?
     
    MrEsquire likes this.
  6. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  7. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    My guess is Color needing to be cast to bytes at some point in the process, and Color32 already being in bytes?