Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Unity 5] Why is the Camera Clear taking so long on device?

Discussion in 'Android' started by adbourdages, Jul 27, 2015.

  1. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    75
    This is problem on my main project, but I created a simple test case from a blank project. There are 2 active objects in the scene: camera and a sprite. On device (htc desire), using the profiler, the following line (Camera.Render-Drawing-Render.OpaqueGeometry-RenderForwardOpaque.Render-Clear) takes 12ms, which represent 33% of the time spend in the frame.

    On the main project, it is the same story, except there are 4 cameras, so 4 x 12ms per frame are spend in "Clear". Other posters on the forum have reported that it used to work fine on 4.6 - something I have seen as well.

    To Unity support: What does the "Clear" do exactly? Why is it so long? How to minimize the impact? Is it a bug?

    To those who have shipped a game on android with U5: how did you deal with it?

    Test device: HTC Desire, android 2.3.7. GRU: Adreno 200.
    Test project: uploaded at https://dl.dropboxusercontent.com/u/27068517/CanvasClear.zip
    Unity v5.1.1p4
    Quality Settings: Fastest (tried adding VSync as recommender by 'bitter' in another thread, but no change)
    Player Settings: Forward render
    Camera setting: Orthographic, Clear Flags: Solid Color (tested with Depth Only as well - same result).
    Shader: Default shader

    Screenshot of the project


    Profiler Screenshot of the "Clear" times:
     
    bart_bender likes this.
  2. bart_bender

    bart_bender

    Joined:
    Mar 21, 2015
    Posts:
    20
    I have the same problem on my android projects with a BQ Elcano 2 (ARM Cortex A7 quad core, gpu PowerVR SGX544)


     

    Attached Files:

  3. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    24
    I am having this same issue with Unity 2018.2 on a Samsung Galaxy S6. Were you able to figure out whats going on here?