Further progress on pixel history view

* Added simple UI
* Don't apply SRGB curve to alpha data
* Account for clear calls not returning occlusion query results, and for
  depth/colour clears.
This commit is contained in:
baldurk
2014-07-13 18:58:45 +01:00
parent 8ef17e41e1
commit 3bb382d9cf
9 changed files with 938 additions and 441 deletions
+26 -2
View File
@@ -1291,7 +1291,11 @@ namespace renderdocui.Windows
if (value == true)
{
debugPixel.Enabled = debugPixelContext.Enabled = true;
debugPixel.Text = debugPixelContext.Text = "Debug this Pixel";
toolTip.RemoveAll();
toolTip.SetToolTip(debugPixelContext, "Debug this pixel");
toolTip.SetToolTip(pixelHistory, "Show history for this pixel");
pixelHistory.Enabled = true;
}
else
{
@@ -1299,7 +1303,11 @@ namespace renderdocui.Windows
m_CurRealValue = null;
debugPixel.Enabled = debugPixelContext.Enabled = false;
debugPixel.Text = debugPixelContext.Text = "RMB to Pick";
toolTip.RemoveAll();
toolTip.SetToolTip(debugPixelContext, "Right Click to choose a pixel");
toolTip.SetToolTip(pixelHistory, "Right Click to choose a pixel");
pixelHistory.Enabled = false;
}
pixelContext.Invalidate();
@@ -2544,6 +2552,22 @@ namespace renderdocui.Windows
render.Invalidate();
}
private void pixelHistory_Click(object sender, EventArgs e)
{
PixelModification[] history = null;
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
{
history = r.PixelHistory(CurrentTexture.ID, (UInt32)m_PickedPoint.X, (UInt32)m_PickedPoint.Y);
this.BeginInvoke(new Action(() =>
{
PixelHistoryView hist = new PixelHistoryView(m_Core, CurrentTexture, m_PickedPoint, history);
hist.Show(DockPanel);
}));
});
}
private void debugPixel_Click(object sender, EventArgs e)
{
ShaderDebugTrace trace = null;