Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
william7ba's avatar
william7ba
Honored Guest
11 years ago

one eye render cost significant more cpu time

Hi,
I profiled our project with unity profile window in editor mode, I got some spike. Normally each eye cost the same, but on spikes it seems one eye cost much more than the other.
Here's some cases I got from profiler,

RenderPrePass.Sort
left:4.08ms
right:0.35ms

RenderPrePass.FinalPass
left:4.72
right:0.80

Render.Prepare
left:4.18
right:0.26

Could someone please tell me why this happens? Thanks!

7 Replies

Replies have been turned off for this discussion
  • Are these profiler samples you inserted yourself? I don't see them in my profile. Does the issue remain if you turn off TimeWarp and VSync? Something like this in one of your scripts' start methods:
    OVRManager.timeWarp = false;
    OVRManager.capiHmd.SetEnabledCaps(OVRManager.capiHmd.GetEnabledCaps() | Ovr.HmdCaps.NoVSync);
    QualitySettings.vSyncCount = 0;
  • "vrdaveb" wrote:
    Are these profiler samples you inserted yourself? I don't see them in my profile. Does the issue remain if you turn off TimeWarp and VSync? Something like this in one of your scripts' start methods:
    OVRManager.timeWarp = false;
    OVRManager.capiHmd.SetEnabledCaps(OVRManager.capiHmd.GetEnabledCaps() | Ovr.HmdCaps.NoVSync);
    QualitySettings.vSyncCount = 0;



    Hi, I did that, still have the problem on spikes, and I didn't insert those samples.
    I attached 2 screenshots of the profiler window, you can see
    1st one for Render.OpaqueGeometry,
    left eye cost 2.14ms, right eye cost 6.14ms.
    2nd one for the culling part,
    left eye cost 5.02ms, right eye cost 0.66ms.
  • this is just a thought, I've been meaning to find out what exactly the stereoscopic rendering option in the preferences->player menu does, do you have that enabled? Could that be causing weirdness? vrdaveb, should that option be enabled for using the Oculus Rift SDK, I know what we're doing is stereoscopic, but do you know what effect the Unity option for this has?
  • I've also seen this before in some scenes. Obvious guess, but do you maybe have some image effects scripts only active on one eye?

    @Molton - Love to learn if Stereoscopic Rendering should be activated. You'd think it would, but in tests it didn't seem to help performance.
  • "william7ba" wrote:
    Render.OpaqueGeometry, left eye cost 2.14ms, right eye cost 6.14ms.

    Can you expand the profile for each eye and see what is taking the time for each one? My best guess right now is that something is visible to one eye but not the other. Is there a UI or a complex object in your scene?

    "molton" wrote:
    I've been meaning to find out what exactly the stereoscopic rendering option in the preferences->player menu does, do you have that enabled?

    Unity's "Stereoscopic 3D" option has nothing to do with VR and should be disabled. It's for stereoscopic TVs and desktop monitors.
  • Thank you VRdaveb.

    Here is a screenshot of this appearing on my end. It will randomly do this in the scene on play.