Skip to main content
Up and Coming
June 17, 2014

Patch tool to force vsync off in any Unity app

Hi all, I recently did some benchmarking of a variety of popular Rift demos, which is described further in this thread:

http://www.reddit.com/r/oculus/comments/28a3ul/fps_of_some_rift_apps_at_1080pnovsync_on_gtx_780/

I discovered that benchmarking Unity apps is a pain because the OVR Unity plugin seems to force on vsync by default, regardless of the global setting in NVIDIA Control Panel. Developers can modify this, but it requires a conscious effort and access to source code (unless I'm missing something).

So I created this patch tool which edits the MSIL bytecode in published/compiled Unity projects to force vsync off. It works with all Unity apps I've tried so far and is great for comparing your frame rate directly on your dev hardware to other demos that are out there. Get it here with full C# source code (built for Windows but should run on Mono):

https://mega.co.nz/#!pMJmRD6Z!-rYIr1HanGqwnv9HFUJ2VVUUgtkQX72PD6-HxEORswI

The code it alters is in OVRCameraController::SetMaximumVisualQuality(). It saves a backup of your original DLL and should be totally safe. Let me know your thoughts or if you find a demo it doesn't work for.

I also posted about this tool earlier at: http://www.reddit.com/r/oculus/comments/28cqk0/patch_tool_to_force_vsync_off_in_any_rift_app/

    4 replies

    Inspiring
    June 17, 2014
    Great work man!
    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
    Up and Coming
    June 18, 2014
    Thanks for creating and sharing this. Downloading now!
    Participant
    July 27, 2014
    This tool doesn't seem to work on the latest unity demos. Can a new one be made?
    Up and Coming
    October 21, 2014
    Bump. Huge need for this, now.
    V-sync causes screen tearing instead of preventing it in my case. Big nice vertical scan line in my DK2.

    Unity games (Presently fighting with AAA for the Awesome), nVidia GTX760, i7 4770k, Win7/64.
    All Unity apps crash when attempted in Direct HMD.I am forced to run all Unity apps in Extend HMD.
    Problem is in Extend HMD with this stubborn impossible to disable v-sync I get a beautiful vertical scan line slicing my image in two.

    Extend HMD should do everything to force v-sync off. Kill it with fire. Make it suicide. Do something!