From 3a977f60397077aa2a7f18712c41736c6b354f24 Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Fri, 27 Oct 2017 22:59:23 +0200 Subject: [PATCH] Disabled stereo in batch when using full screen outline --- libraries/render-utils/src/OutlineEffect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/render-utils/src/OutlineEffect.cpp b/libraries/render-utils/src/OutlineEffect.cpp index f459ddc42c..ad4c59b35a 100644 --- a/libraries/render-utils/src/OutlineEffect.cpp +++ b/libraries/render-utils/src/OutlineEffect.cpp @@ -278,6 +278,9 @@ void DrawOutline::run(const render::RenderContextPointer& renderContext, const I auto outlineFrameBuffer = inputs.get1(); auto outlineRect = inputs.get3(); + // TODO : If scissor isn't possible in stereo, send the AABox in the shader + // and do a raycasting per pixel to determine if we need to do the outline + // This should improve performance. if (outlineFrameBuffer && outlineRect.z>0 && outlineRect.w>0) { auto sceneDepthBuffer = inputs.get2(); const auto frameTransform = inputs.get0(); @@ -299,6 +302,9 @@ void DrawOutline::run(const render::RenderContextPointer& renderContext, const I } gpu::doInBatch(args->_context, [&](gpu::Batch& batch) { +#if !OUTLINE_USE_SCISSOR + batch.enableStereo(false); +#endif batch.setFramebuffer(destinationFrameBuffer); batch.setViewportTransform(args->_viewport);