From 91a36463965e3010731a5443f6e18c2f009b3586 Mon Sep 17 00:00:00 2001 From: Eric Mehl Date: Mon, 5 Feb 2024 15:27:32 -0500 Subject: [PATCH] fixup! IECoreGL::Selector : Camera-space depth sampling --- src/IECoreGL/Selector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IECoreGL/Selector.cpp b/src/IECoreGL/Selector.cpp index 38555febf1..53dd5d063a 100644 --- a/src/IECoreGL/Selector.cpp +++ b/src/IECoreGL/Selector.cpp @@ -443,10 +443,10 @@ class Selector::Implementation : public IECore::RefCounted std::vector buffers; buffers.resize( std::max( fragDataLocation, depthDataLocation ) + 1, GL_NONE ); - buffers[buffers.size() - ( depthDataLocation > 0 ? 2 : 1 )] = GL_COLOR_ATTACHMENT0; + buffers[fragDataLocation] = GL_COLOR_ATTACHMENT0; if( m_useCameraDepth ) { - buffers[buffers.size() - 1] = GL_COLOR_ATTACHMENT1; + buffers[depthDataLocation] = GL_COLOR_ATTACHMENT1; } glDrawBuffers( buffers.size(), &buffers[0] );