Skip to main content
Inspiring
June 24, 2015

Disable vsync in 0.6.0

I'm trying to disable vsync in the latest sdk but it doesnt seem to have any effect when turning it off through the quality settings, is there a workaround for this?
    This topic has been closed for replies.

    9 replies

    Inspiring
    June 24, 2015
    What version of Unity are you using? Testing stand-alone build or in editor? Extended or Direct Mode?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    MikeFAuthor
    Inspiring
    June 24, 2015
    Sorry, was in a rush
    -5.0.3f2
    -same result in editor and build of vsync forced on
    -same result with direct mode and extended
    Inspiring
    June 24, 2015
    I see this comment in OVRManager.cs:

    SDK rendering forces vsync unless you pass ovrHmdCap_NoVSync to Hmd.SetEnabledCaps()


    EDIT: Removed my bad information.

    Does that fix your issue?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    MikeFAuthor
    Inspiring
    June 24, 2015
    No that didnt seem to have any effect
    Inspiring
    June 24, 2015
    Sorry, that was bad info. Just my luck for trying to code without compiling it.

    The real fix is below. You can add this code to the bottom of Update() in OVRPlayerController:

    if(Input.GetKeyUp(KeyCode.N)){
    uint caps = OVRManager.capiHmd.GetEnabledCaps();
    caps ^= (uint)HmdCaps.NoVSync;
    OVRManager.capiHmd.SetEnabledCaps(caps);
    }
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    MikeFAuthor
    Inspiring
    June 25, 2015
    Ok i tried putting it where you said and i'm getting this error:
    The name `HmdCaps' does not exist in the current context
    Inspiring
    June 25, 2015
    You need to put this at the top of the file under the other using statements (around line 24):

    using Ovr;
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    MikeFAuthor
    Inspiring
    June 25, 2015
    great that did it. Thanks!
    Inspiring
    June 25, 2015
    Awesome!
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV