Search Unity

Low FPS / Drawing thousands of primitives

Discussion in 'AR/VR (XR) Discussion' started by mshravan94, Apr 5, 2019.

  1. mshravan94

    mshravan94

    Joined:
    Oct 10, 2018
    Posts:
    4
    I am developing an application that renders close to 20000 primitive unity spheres. When Hololens was profiled, the GPU capacity was maximized as expected. So I tried to use the mobile shaders as I read they are optimized for mobile displays. When I profiled my application again, My GPU and CPU were within the limits but my frame rate was very low ( 4-5 FPS, image attached). I assumed that frame rates get affected only when CPU or GPU reach their full capacity. Are there other factors that could affect the frame rate? Are the mobile shaders not compatible with hololens somehow? Any help would be greatly appreciated. Thanks

     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You're just doing too much work. To draw that many things at a reasonable frame rate, you'll need to dig into GPU instancing.
     
    mshravan94 likes this.
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,443
    or try using particles
     
    mshravan94 and JoeStrout like this.
  4. mshravan94

    mshravan94

    Joined:
    Oct 10, 2018
    Posts:
    4
    Thanks for the suggestions, Will try it out and let you guys know :)
     
  5. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Also that looks like you are doing HoloLens development, and the hololens is a very low power device. You will struggle rendering high amounts of stuff on it at 60fps+
     
  6. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Is this not a good candidate for ECS?