From 8526ac74a51076adda3b4793d39a321bc0e5042d Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Fri, 7 Oct 2016 13:36:49 -0700 Subject: [PATCH] Turn on forced reprojection on i5 systems --- plugins/openvr/src/OpenVrDisplayPlugin.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/openvr/src/OpenVrDisplayPlugin.cpp b/plugins/openvr/src/OpenVrDisplayPlugin.cpp index 9247ebea0b..68bb23a84d 100644 --- a/plugins/openvr/src/OpenVrDisplayPlugin.cpp +++ b/plugins/openvr/src/OpenVrDisplayPlugin.cpp @@ -39,6 +39,10 @@ const QString StandingHMDSensorMode = "Standing HMD Sensor Mode"; // this probab PoseData _nextRenderPoseData; PoseData _nextSimPoseData; +#define MIN_CORES_FOR_NORMAL_RENDER 5 +bool forceInterleavedReprojection = (QThread::idealThreadCount() < MIN_CORES_FOR_NORMAL_RENDER); + + static std::array VR_EYES { { vr::Eye_Left, vr::Eye_Right } }; bool _openVrDisplayActive { false }; // Flip y-axis since GL UV coords are backwards. @@ -399,7 +403,10 @@ bool OpenVrDisplayPlugin::internalActivate() { }); // enable async time warp - //vr::VRCompositor()->ForceInterleavedReprojectionOn(true); + if (forceInterleavedReprojection) { + vr::VRCompositor()->ForceInterleavedReprojectionOn(true); + } + // set up default sensor space such that the UI overlay will align with the front of the room. auto chaperone = vr::VRChaperone();