diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6e93e67d5a..2079705bcf 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5053,6 +5053,7 @@ void Application::update(float deltaTime) { float sensorToWorldScale = getMyAvatar()->getSensorToWorldScale(); appRenderArgs._sensorToWorldScale = sensorToWorldScale; + appRenderArgs._sensorToWorld = getMyAvatar()->getSensorToWorldMatrix(); { PROFILE_RANGE(render, "/buildFrustrumAndArgs"); { diff --git a/interface/src/ui/OverlayConductor.cpp b/interface/src/ui/OverlayConductor.cpp index 71aff38032..dbf58c5cbc 100644 --- a/interface/src/ui/OverlayConductor.cpp +++ b/interface/src/ui/OverlayConductor.cpp @@ -96,7 +96,6 @@ bool OverlayConductor::updateAvatarHasDriveInput() { void OverlayConductor::centerUI() { // place the overlay at the current hmd position in sensor space auto camMat = cancelOutRollAndPitch(qApp->getHMDSensorPose()); - qDebug() << "OverlayConductor::centerUI" << camMat; qApp->getApplicationCompositor().setModelTransform(Transform(camMat)); } diff --git a/interface/src/ui/overlays/Base3DOverlay.cpp b/interface/src/ui/overlays/Base3DOverlay.cpp index 6625ae54f7..a34240483b 100644 --- a/interface/src/ui/overlays/Base3DOverlay.cpp +++ b/interface/src/ui/overlays/Base3DOverlay.cpp @@ -277,10 +277,10 @@ void Base3DOverlay::update(float duration) { // then the correct transform used for rendering is computed in the update transaction and assigned. if (_renderTransformDirty) { auto itemID = getRenderItemID(); - // Capture the render transform value in game loop before - auto latestTransform = evalRenderTransform(); - _renderTransformDirty = false; if (render::Item::isValidID(itemID)) { + // Capture the render transform value in game loop before + auto latestTransform = evalRenderTransform(); + _renderTransformDirty = false; render::ScenePointer scene = qApp->getMain3DScene(); render::Transaction transaction; transaction.updateItem(itemID, [latestTransform](Overlay& data) { @@ -290,8 +290,6 @@ void Base3DOverlay::update(float duration) { } }); scene->enqueueTransaction(transaction); - } else { - setRenderTransform(latestTransform); } } } diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp index 13abcbadc6..88aa56cccf 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp @@ -570,11 +570,11 @@ std::function OpenGLDisplayPlugin batch.setResourceTexture(0, hudTexture); if (isStereo()) { for_each_eye([&](Eye eye) { - batch.setViewportTransform(eyeViewport(eye, getRecommendedRenderSize())); + batch.setViewportTransform(eyeViewport(eye)); batch.draw(gpu::TRIANGLE_STRIP, 4); }); } else { - batch.setViewportTransform(ivec4(uvec2(0), getRecommendedRenderSize())); + batch.setViewportTransform(ivec4(uvec2(0), _compositeFramebuffer->getSize())); batch.draw(gpu::TRIANGLE_STRIP, 4); } } @@ -840,15 +840,6 @@ ivec4 OpenGLDisplayPlugin::eyeViewport(Eye eye) const { return ivec4(vpPos, vpSize); } -ivec4 OpenGLDisplayPlugin::eyeViewport(Eye eye, uvec2 vpSize) const { - vpSize.x /= 2; - uvec2 vpPos; - if (eye == Eye::Right) { - vpPos.x = vpSize.x; - } - return ivec4(vpPos, vpSize); -} - gpu::gl::GLBackend* OpenGLDisplayPlugin::getGLBackend() { if (!_gpuContext || !_gpuContext->getBackend()) { return nullptr; diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h index 4bb82f3651..ec775aed4c 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h @@ -125,7 +125,6 @@ protected: void present(); virtual void swapBuffers(); ivec4 eyeViewport(Eye eye) const; - ivec4 eyeViewport(Eye eye, uvec2 vpSize) const; void render(std::function f); diff --git a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp index fde9b26779..053f3171be 100644 --- a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp @@ -444,7 +444,6 @@ std::function HmdDisplayPlugin::H batch.setUniformBuffer(uniformsLocation, uniformsBuffer); auto compositorHelper = DependencyManager::get(); - qDebug() << "getUITransform" << compositorHelper->getUiTransform(); batch.setModelTransform(compositorHelper->getUiTransform()); batch.setResourceTexture(0, hudTexture);