Forum Discussion
phileday
11 years agoMHCP Member
Turning off Vsync in 0.4.3?
i have a video plugin in my Unity project that goes very juddery when Vsync is on. I'd like to turn it off but don't know how to do it. I've read other post that refer to Vsync via EnabledCaps but don...
Anonymous
11 years agoHere is the C# code I use to do this:
I think the equivalent in Java would be (Java doesn't have unsigned int type or the |= operator):
This uses a binary(bitwise) "OR" function. You want to "OR" the existing caps (a lot of stuff is packed into the caps integer) with the NoVysnc value.
Keep in mind running with vsync off is going to give you a really bad VR experience. I would only use this for testing to see what your application's performance is with vsync not capping it at 75fps.
public static void SetVsyncOff() {
uint caps = OVRManager.capiHmd.GetEnabledCaps();
caps |= (uint)Ovr.HmdCaps.NoVSync;
OVRManager.capiHmd.SetEnabledCaps(caps);
}
I think the equivalent in Java would be (Java doesn't have unsigned int type or the |= operator):
public static void SetVsyncOff() {
int caps = OVRManager.capiHmd.GetEnabledCaps();
caps = caps | Ovr.HmdCaps.NoVSync;
OVRManager.capiHmd.SetEnabledCaps(caps);
}
This uses a binary(bitwise) "OR" function. You want to "OR" the existing caps (a lot of stuff is packed into the caps integer) with the NoVysnc value.
Keep in mind running with vsync off is going to give you a really bad VR experience. I would only use this for testing to see what your application's performance is with vsync not capping it at 75fps.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device