Added some comments to try to help understand the correction pipeline

This commit is contained in:
Olivier Prat 2018-02-23 09:11:17 +01:00
parent ae63610582
commit 7432c8361e

View file

@ -341,7 +341,10 @@ void HmdDisplayPlugin::updateFrameData() {
auto invBatchPose = glm::inverse(_currentFrame->pose);
auto invPrevBatchPose = glm::inverse(_currentFrame->prevPose);
auto correction = invBatchPose * _currentPresentFrameInfo.presentPose;
auto prevCorrection = /*_currentFrame->prevView * glm::inverse(_prevRenderView) */ invPrevBatchPose * _previousPresentFrameInfo.presentPose;
// _currentFrame->prevView * glm::inverse(_prevRenderView) : this is to get the
// view matrix of the last rendered frame in the present thread
auto prevCorrection = _currentFrame->prevView * glm::inverse(_prevRenderView);
prevCorrection = prevCorrection * invPrevBatchPose * _previousPresentFrameInfo.presentPose;
getGLBackend()->setCameraCorrection(correction, prevCorrection);