Showing the changes to interface/src/Application_Graphics.cpp (1 of 1 file). Show all
Unified · Split
| @@ -551,16 +551,10 @@ void Application::updateRenderArgs(float deltaTime) { · 550 unmodified lines | ||
| 551 | 551 | // only when the display plugin changes (or in non-HMD modes when the user |
| 552 | 552 | // changes the FOV manually, which right now I don't think they can. |
| 553 | 553 | for_each_eye([&](Eye eye) { |
| 554 | − // For providing the stereo eye views, the HMD head pose has already been | |
| 555 | − // applied to the avatar, so we need to get the difference between the head | |
| 556 | − // pose applied to the avatar and the per eye pose, and use THAT as | |
| 557 | − // the per-eye stereo matrix adjustment. | |
| 558 | − mat4 eyeToHead = getActiveDisplayPlugin()->getEyeToHeadTransform(eye); | |
| 559 | 554 | // Grab the translation |
| 560 | − vec3 eyeOffset = glm::vec3(eyeToHead[3]); | |
| 555 | + eyeOffsets[eye] = getActiveDisplayPlugin()->getEyeToHeadTransform(eye); | |
| 561 | 556 | // Apply IPD scaling |
| 562 | − mat4 eyeOffsetTransform = glm::translate(mat4(), eyeOffset * -1.0f * ipdScale); | |
| 563 | − eyeOffsets[eye] = eyeOffsetTransform; | |
| 557 | + eyeOffsets[eye][3][0] *= ipdScale; | |
| 564 | 558 | eyeProjections[eye] = getActiveDisplayPlugin()->getEyeProjection(eye, baseProjection); |
| 565 | 559 | }); |
| 566 | 560 | |