From 809e986738066de9c7302f162def7ecb85c483d7 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 14 Sep 2017 15:49:09 -0700 Subject: [PATCH] Fixes for lasers on 2d HUD --- interface/src/Application.cpp | 13 ++----------- .../src/display-plugins/hmd/HmdDisplayPlugin.cpp | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 5700bb6a72..8c64a626c2 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2637,17 +2637,8 @@ void Application::paintGL() { PerformanceTimer perfTimer("postComposite"); renderArgs._batch = &postCompositeBatch; renderArgs._batch->setViewportTransform(ivec4(0, 0, finalFramebufferSize.width(), finalFramebufferSize.height())); - for_each_eye([&](Eye eye) { - - // apply eye offset and IPD scale to the view matrix - mat4 eyeToHead = displayPlugin->getEyeToHeadTransform(eye); - vec3 eyeOffset = glm::vec3(eyeToHead[3]); - mat4 eyeOffsetTransform = glm::translate(mat4(), eyeOffset * -1.0f * ipdScale); - renderArgs._batch->setViewTransform(renderArgs.getViewFrustum().getView() * eyeOffsetTransform); - - renderArgs._batch->setProjectionTransform(eyeProjections[eye]); - _overlays.render3DHUDOverlays(&renderArgs); - }); + renderArgs._batch->setViewTransform(renderArgs.getViewFrustum().getView()); + _overlays.render3DHUDOverlays(&renderArgs); } auto frame = _gpuContext->endFrame(); diff --git a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp index caeba37839..88ec94eefb 100644 --- a/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/hmd/HmdDisplayPlugin.cpp @@ -441,7 +441,7 @@ void HmdDisplayPlugin::OverlayRenderer::updatePipeline() { this->uniformsLocation = program->getUniformBuffers().findLocation("overlayBuffer"); gpu::StatePointer state = gpu::StatePointer(new gpu::State()); - state->setDepthTest(gpu::State::DepthTest(true, true, gpu::LESS_EQUAL)); + state->setDepthTest(gpu::State::DepthTest(false, false, gpu::LESS_EQUAL)); state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE);