Search Unity

Camera renderer is horrendous

Discussion in 'General Graphics' started by Bagazi, May 19, 2021.

  1. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    upload_2021-5-19_11-10-2.png


    upload_2021-5-19_11-10-36.png

    The renderering is horrendous in Unity editor,maybe there is a lot of ploygons in the game.But I am still wanderring whether there is some way to speed it up.. And when I compile the game and then run it,it is OK,at least about the fps. Is there any difference of the camera renderring or the data statistics between editor mode and the game mode?
     

    Attached Files:

    Last edited: May 19, 2021
  2. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    You have 26K batches, that's a pretty big red flag. You'll need to reorganise the your assets so that:
    1. Lots of objects are marked as static. This will allow Unity to group some of them together.
    2. Lots of objects share the same material. This should allow Unity to group static objects better, but also amortise the cost of rendering the non-static ones (I might be wrong on that, maybe it's only in the scriptable render pipelines)
     
    Bagazi and JoNax97 like this.
  3. vTimePawel

    vTimePawel

    Joined:
    Aug 1, 2017
    Posts:
    32
    Above is the correct solution to your problem. Camera.Render is sending 25000 jobs to the GPU every frame.
    Read up on reducing draw calls, for unity specifically and in general.
    Static objects, shared materials and instancing are 3 major ways.
     
    Bagazi likes this.