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

What does 'RenderForwardOpaque.Render Clear' mean?

Discussion in 'Editor & General Support' started by sehyun-park, Mar 28, 2019.

  1. sehyun-park

    sehyun-park

    Joined:
    Nov 6, 2015
    Posts:
    5
    please answer about my question.

    Google search results:
    This is the time on the CPU where Unity is waiting for the clear graphics API call. Typically this means that the CPU is waiting for the GPU to catch up. As an experiment you could try to render less or use cheaper shaders and check if the clear time changes [https://forum.unity.com/threads/uni...-under-gpu-renderforwardopaque-render.469099/]

    1. Does this mean GPU bottleneck in the end?

    2. What is a clear graphical API?
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Hello,

    you could have probably responded to the thread you linked to and ask for a clarification. I don't have any deeper insight into that particular sample but maybe I can rephrase the explanation given there in the way that I understand it.

    1. Yes, this would indicate that you are GPU bound. You are likely rendering too much and would need to optimize something.

    2. The Graphics API is our communication channel with the GPU. Part of that API is the method Clear() that is (my guess) getting called before trying to render the next thing. Execution would then take as long as it takes to finish rendering anything that was already queued up to be processed.
     
  3. phuongnh

    phuongnh

    Joined:
    Sep 23, 2019
    Posts:
    22
    @MartinTilo I have the same problem with RenderForwardOpaque.Render -> Clear. Athough it’s only rendering a scene with 3 draw calls (it’s a simple UI with a background and less than 5 simple UI images). My device is iPad Mini 4.
    Most of the time my game is running stable but this issue ocurs randomly (maybe it started when the banner ad is loaded/refreshed). And from that time, the profiler show spikes of RenderForwardOpaque.Render -> Clear. Fps dropped down below 60fps and very lagging.

    I also see that, if I try to interrupt the device, it might help recover to normal state (try several times).
    My Unity version is 2018.4.12f1.
    Could you give me any advices on this please?

    Thank you.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    @phuongnh as I said above, I have no real knowledge of that system. Possibly there is a limit on the number of RenderTextures or render targets that is breached once the ad shows up. Maybe that's also why it can potentially be reset?
     
  5. phuongnh

    phuongnh

    Joined:
    Sep 23, 2019
    Posts:
    22
    Thanks for your replay @MartinTilo.

    As my game is just a very simple 2d game, so it should not be something complicated :(
    And in this case, I wish we could have a way to reset everything explicitly.
     
  6. prometeoproduction

    prometeoproduction

    Joined:
    Apr 19, 2019
    Posts:
    17