From 37d1bbdca2d45c41cf44a400e8fe539dd6b4a93a Mon Sep 17 00:00:00 2001 From: Noeri Huisman Date: Sat, 13 Nov 2021 15:14:51 +0100 Subject: [PATCH] Retrieve depth texture from correct stage and for the correct eye --- Providers/Display/Display.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Providers/Display/Display.cpp b/Providers/Display/Display.cpp index 0e9d43c..22d2ced 100644 --- a/Providers/Display/Display.cpp +++ b/Providers/Display/Display.cpp @@ -758,9 +758,9 @@ bool OpenVRDisplayProvider::SubmitToCompositor( vr::EVREye eEye, int nStage ) tex.eColorSpace = vr::ColorSpace_Auto; // Check if we have a valid depth buffer - if (m_pNativeDepthTextures[eEye][nStage]) - { - tex.depth.handle = m_pNativeDepthTextures[eEye][nStage]; + if (m_pNativeDepthTextures[nStage][nTexIndex]) + { + tex.depth.handle = m_pNativeDepthTextures[nStage][nTexIndex]; } if ( !m_bIsOverlayApplication ) @@ -1158,7 +1158,7 @@ void *OpenVRDisplayProvider::GetNativeEyeTexture( int stage, int eye ) return m_pNativeColorTextures[stage][eye]; } - + void OpenVRDisplayProvider::ReleaseOverlayPointers() { #ifndef __linux__