Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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?