From ad4bc8911eb3e34f2dcd385e50d1640e6fabf104 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 2 Nov 2018 11:02:26 +0000 Subject: [PATCH] Always display all 4 components of output from shader in pixel history * This means the alpha that was output (and maybe used for blending) is displayed even when the target texture doesn't have an alpha component. --- qrenderdoc/Windows/PixelHistoryView.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/PixelHistoryView.cpp b/qrenderdoc/Windows/PixelHistoryView.cpp index bd9c80f55..4df59e38f 100644 --- a/qrenderdoc/Windows/PixelHistoryView.cpp +++ b/qrenderdoc/Windows/PixelHistoryView.cpp @@ -300,7 +300,7 @@ public: return tr("No Pixel\nShader\nBound"); if(mod.directShaderWrite) return tr("Tex Before\n\n") + modString(mod.preMod); - return tr("Shader Out\n\n") + modString(mod.shaderOut); + return tr("Shader Out\n\n") + modString(mod.shaderOut, 4); } } @@ -485,12 +485,15 @@ private: return QBrush(QColor::fromRgb((int)(255.0f * r), (int)(255.0f * g), (int)(255.0f * b))); } - QString modString(const ModificationValue &val) const + QString modString(const ModificationValue &val, int forceComps = 0) const { QString s; int numComps = (int)(m_Tex->format.compCount); + if(forceComps > 0) + numComps = forceComps; + static const QString colourLetterPrefix[] = {lit("R: "), lit("G: "), lit("B: "), lit("A: ")}; if(!m_IsDepth)