Search Unity

Unity Profiler spikes "RenderForwardOpaque.Render / Clear" in GearVR build?

Discussion in 'AR/VR (XR) Discussion' started by CoinOpus, Nov 4, 2016.

  1. CoinOpus

    CoinOpus

    Joined:
    Apr 12, 2014
    Posts:
    1
    Hi all and thanks for taking the time to look.

    I'm in the middle of putting together a Unity game and have been tinkering with a Gear VR build (it's otherwise been android focused so far).

    Unfortunately I've been seeing spikes in the Unity profiler unique to the GearVR build that are causing unacceptable juddering in game:
    1. CPU Usage: VR:WaitForGPU
    2. GPU Usage: Camera.Render / Drawing / Render.OpaqueGeometry / RenderForwardOpaque.Render / Clear



    I originally wondered if I was trying to push too hard graphically so for the purpose of testing the problem I stripped out any non essentials. The screengrabs are taken using a minimal build which appears to be well within the draw call / poly limits that often come up in GearVR optimisation articles (at the point of the screenshots 13 SetPass Calls, 23 Draw Calls, Tris 31k, Verts 57k.)

    Some details if it helps then: I'm running Unity 5.4.2f2, testing on a Samsung S6. Geometry is procedural but batched after instantiating. Shader is Digicrafts Colorbox (Unlit Gradient) however problem persists using Vertex Lit or Mobile Diffuse. Skybox is also Colorbox, again changing this to an alternative or to solid colour has no impact. Quality is fastest but with 2xMSAA. No other lighting, shadows etc in scene. Canvas is turned off for the purpose of testing. Forward Rendering Path. Camera clears to Skybox (no improvement changing to solid colour). The issue does not appear on the standard (non VR) android build nor in the editor.

    I know there is no magic answer here since you can only go by what I've written and the screenshots but could someone please point me in the right direction for the RenderForwardOpaque.Render / Clear issue ? I'm presuming VR:WaitForGPU is in response to this but I don't otherwise know what it is or what I can do (if anything) to alleviate the issue. Where should I be looking to solve this ?

    Many thanks in advance.
     
    fengweipeng likes this.
  2. pixelpowa

    pixelpowa

    Joined:
    Jan 16, 2014
    Posts:
    3
    I'm seeing the same spikes on iOS for my simple 2D game. ~600 vertices and ~4 SetPass calls, which my iPhone 6S Plus should easily be able to handle.

    Did you ever find a fix for this issue?
     
  3. fengweipeng

    fengweipeng

    Joined:
    Nov 30, 2015
    Posts:
    2
    I come upon the same problem.
     
  4. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    i have the same problem. what is the solution?
     
  5. xdotcommer

    xdotcommer

    Joined:
    Aug 20, 2014
    Posts:
    33
    Anyone figure it out? I promise to post if i do...
     
  6. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    14
    I'm having a similar issue with Unity 2018.2 and Samsung Galaxy S6. 80% or more spent on RenderForwardOpaque.Render / Clear. Anyone have any luck with this?
     
  7. sowee15

    sowee15

    Joined:
    Nov 23, 2015
    Posts:
    6
    Same issue, Unity 2018.2 Galaxy S5
     
  8. 0rigin93

    0rigin93

    Joined:
    Dec 11, 2016
    Posts:
    3
    Same issue in a scene, in which only 7-8 sprites are rendered (Main Menu). Seems to be affecting a lot of people. Did anyone try using the new LightWeight Pipeline?