Search Unity

LWRP Renders at 30fps on Oculus Go

Discussion in 'VR' started by BovineOx, Mar 24, 2019.

  1. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Hi All

    I've been looking at Oculus Go and was intrigued by the LWRP, hoping that this would produce great visuals and be able to maintain framerate.

    However, I have (finally) managed to get a simple scene onto the GO using the OVRCameraRig and rendering a simple scene with one pixel light and around 1000 triangles, plus the controller model.

    For some reason the scene renders at 30fps, rather than 60fps which I would expect. Using the default pipeline (not LWRP) I get a solid 60fps rendering 45K polys, so this isn't great if using the LWRP is dumping the FPS to 30fps. The scene contains only static geometry, 1 light, ~1000 triangles I'd say, and a single LWRP material - Simple Lit.

    Note that I've found that using Vulkan is a non-starter - it took me ages, but seems that trying to use Vulkan borks the application and the application doesn't even render the unity splash screen.

    Any thoughts welcome. This LWRP does seem to be
     
  2. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Just to add some other details:
    • Unity version 2019.2.0a9 (was reading that using the latest Alpha was recommended)
    • Lightweight Render Pipeline is version 5.2.3
    • Oculus Go patched to latest? 3.58.5.14xxxxxx
     
  3. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    2,219
    Your sure you dont have vsync enabled for LWRP version?
     
  4. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Well it's hard to know tbh. Here's what I have:
    1. vsync was not set, I believe the setting is none, so I would imagine FPS is unclamped by vsync
    2. However, I had read that FPS defaults to 30 fps for android, so I tried a Start() script setting this to -1, also in theory uncapped
    3. I've also tried both -1 and every frame vsync (as opposed to off or skipping each vsync) - in theory vsync is good for VR, tearing is bad or prohibited anyway
    4. I've tried cutting back on rendering, turning off lights, setting to unlit shaders etc....
    It certainly feels like it is being clamped, but whether that is targetFrameRate, vsync and slow performance or something else, I am not sure how I can tell.
     
  5. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Just to update that, I bound some controller buttons to changing the vsync and targetFrameRate values and basically with targetFrameRate the 30fps lock is gone. Worryingly, the scene still dips below 60 fps, but I' wondering if this is the large alpha UI canvas from the go test rig... I'll update later should I get anywhere, but essentially, LWRP does not seem to be lightweight or fast, on Oculus Go.

    EDIT: will look some more, skybox seems to be more stable than clear to black - I'll keep playing around....
     
    Last edited: Mar 25, 2019
    JoeStrout likes this.
  6. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    I'm able to render on Go a static scene of about 30K polys at 60fps for the most part. I've got 5 or 6 point lights in the scene and it's looking okay.

    The render stats show garbage for SRP pipeline btw, because it appears the for SRP, Unity doesn't know how to count the calls accurately, looking in the frame rate debugger.

    I think with LOD Groups, this could be workable, especially as there's likely to be less geometry visible typically.
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,403
    So what was it, exactly, that got you out of the 30 fps limit?

    For my $0.02, 30K static polys is not very much. You could do that (and more, I think) without using LWRP. I'm not sure it sounds worth it to me. But I'm curious to hear the solution you found anyway!
     
    GameDevCouple_I likes this.
  8. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Yeah, I was wondering afterwards, but 6 lights and 30K *feels* pretty good IMHO. Though I am going to downgrade to the standard rendered and see how it fairs. I am reading Vulkan can yield 2-4 times speed improvements, but it dies on the Oculus Go before the splash screen. I might do some digging to see if I can get a crash report tbh.

    The problem was targetFrameRate was set to 30 and setting it to -1 didn't have any impact, which I was expecting it to, but setting it to 60 worked a treat! vsync setting seemed to have zero affect regardless.
     
    JoeStrout likes this.
  9. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    Just an update on this that in the beta just released it explicitly states that Vulkan is not currently supported for XR, so I guess the wait will continue. Kind of mindful that this wait may have begun in 2017 for some people, so maybe it will e 2020 before it actually works :/
     
  10. BovineOx

    BovineOx

    Joined:
    Feb 23, 2019
    Posts:
    15
    It's not good tbh, unless the SRP can be stripped back more, using IL2CPP with the default renderer produces better results - typically 55-60fps with 6 lights, vs 45-60fps. I wonder if static batching is working properly on the Go :/
     
  11. davidcox70

    davidcox70

    Joined:
    Oct 19, 2016
    Posts:
    29
    Just to chime in...I am updating a Google Daydream project that was using the Daydream renderer and attaining 57-60 FPS. I converted to LWRP and found the FPS (as reported by the Daydream performance HUD) was locked to 30 FPS when VSync was disabled, but rose to 34 FPS when Vsync was enabled.

    I should add that I am effectively "starting over" with this project to clear away any historical baggage, as it has been updated through many Unity versions. So I started with a new Unity 2019 LWRP project and imported the various assets from the old project. It is possible there are various project settings differences contributing to the lack of performance, but I've gone through the obvious ones and nothing yet is improving performance. Will keep looking...

    DC
    Unity 2019.1.1f1
     
    Last edited: May 10, 2019
unityunity