History

Fix for Oculus timewarp judder introduced by 20d784ba39db

Moved myAvatar->updateFromHMDSensorMatrix from Application::update back into Application::paintGL, so it occurs between displayPlugin->preRender() and displayPlugin->display(). We should render with the most up-to-date camera position as possible, and sample it at the same frequency as the display rate.

Anthony J. Thibault committed 11 years ago

Commit e32eb381 parent 2d477ad3 files · +15 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+3−3
@@ -1055,6 +1055,9 @@ void Application::paintGL() { · 1054 unmodified lines
1055 displayPlugin->preRender();1055 displayPlugin->preRender();
1056 _offscreenContext->makeCurrent();1056 _offscreenContext->makeCurrent();
1057 1057
1058 // update the avatar with a fresh HMD pose
1059 _myAvatar->updateFromHMDSensorMatrix(getHMDSensorPose());
1060
1058 auto lodManager = DependencyManager::get<LODManager>();1061 auto lodManager = DependencyManager::get<LODManager>();
1059 1062
1060 1063
@@ -2895,9 +2898,6 @@ void Application::update(float deltaTime) { · 1834 unmodified lines
2895 userInputMapper->getActionState(UserInputMapper::SHIFT), RIGHT_HAND_INDEX);2898 userInputMapper->getActionState(UserInputMapper::SHIFT), RIGHT_HAND_INDEX);
2896 }2899 }
2897 2900
2898 // update the avatar with a fresh HMD pose
2899 _myAvatar->updateFromHMDSensorMatrix(getHMDSensorPose(), deltaTime);
2900
2901 updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process...2901 updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process...
2902 2902
2903 updateCamera(deltaTime); // handle various camera tweaks like off axis projection2903 updateCamera(deltaTime); // handle various camera tweaks like off axis projection