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/
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/
