Forum Discussion

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

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

  • Thanks for creating and sharing this. Downloading now!
  • This tool doesn't seem to work on the latest unity demos. Can a new one be made?
  • 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!