From a786ac2eab7cc9d5d3b8b5cf969e8bad53bffab3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 19 Aug 2016 15:47:47 +0200 Subject: [PATCH] When switching textures/events, leave pixel pick result valid * This avoids a flicker when using remote replay while the pick result comes in --- renderdocui/Windows/TextureViewer.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/renderdocui/Windows/TextureViewer.cs b/renderdocui/Windows/TextureViewer.cs index 412657cc3..d774ae945 100644 --- a/renderdocui/Windows/TextureViewer.cs +++ b/renderdocui/Windows/TextureViewer.cs @@ -1598,9 +1598,6 @@ namespace renderdocui.Windows if (m_TexDisplay.typeHint == FormatComponentType.None && m_TextureSettings.ContainsKey(m_TexDisplay.texid)) m_TexDisplay.typeHint = m_TextureSettings[m_TexDisplay.texid].typeHint; - m_CurPixelValue = null; - m_CurRealValue = null; - // try to maintain the pan in the new texture. If the new texture // is approx an integer multiple of the old texture, just changing // the scale will keep everything the same. This is useful for @@ -1833,6 +1830,9 @@ namespace renderdocui.Windows if (tex.ID != ResourceId.Null) { + if (m_Output != null) + RT_PickPixelsAndUpdate(m_PickedPoint.X, m_PickedPoint.Y, true); + var us = r.GetUsage(tex.ID); var tb = m_Core.TimelineBar; @@ -1845,6 +1845,11 @@ namespace renderdocui.Windows })); } } + else + { + m_CurPixelValue = null; + m_CurRealValue = null; + } }); }