mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Support pixel history over a specific mip/array slice only
This commit is contained in:
@@ -228,7 +228,7 @@ namespace renderdoc
|
||||
private static extern bool ReplayRenderer_GetDebugMessages(IntPtr real, IntPtr outmsgs);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_PixelHistory(IntPtr real, ResourceId target, UInt32 x, UInt32 y, UInt32 sampleIdx, IntPtr history);
|
||||
private static extern bool ReplayRenderer_PixelHistory(IntPtr real, ResourceId target, UInt32 x, UInt32 y, UInt32 slice, UInt32 mip, UInt32 sampleIdx, IntPtr history);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_DebugVertex(IntPtr real, UInt32 vertid, UInt32 instid, UInt32 idx, UInt32 instOffset, UInt32 vertOffset, IntPtr outtrace);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
@@ -610,11 +610,11 @@ namespace renderdoc
|
||||
return ret;
|
||||
}
|
||||
|
||||
public PixelModification[] PixelHistory(ResourceId target, UInt32 x, UInt32 y, UInt32 sampleIdx)
|
||||
public PixelModification[] PixelHistory(ResourceId target, UInt32 x, UInt32 y, UInt32 slice, UInt32 mip, UInt32 sampleIdx)
|
||||
{
|
||||
IntPtr mem = CustomMarshal.Alloc(typeof(templated_array));
|
||||
|
||||
bool success = ReplayRenderer_PixelHistory(m_Real, target, x, y, sampleIdx, mem);
|
||||
bool success = ReplayRenderer_PixelHistory(m_Real, target, x, y, slice, mip, sampleIdx, mem);
|
||||
|
||||
PixelModification[] ret = null;
|
||||
|
||||
|
||||
@@ -2967,7 +2967,10 @@ namespace renderdocui.Windows
|
||||
{
|
||||
PixelModification[] history = null;
|
||||
|
||||
PixelHistoryView hist = new PixelHistoryView(m_Core, CurrentTexture, m_PickedPoint, m_TexDisplay.sampleIdx,
|
||||
int x = m_PickedPoint.X >> (int)m_TexDisplay.mip;
|
||||
int y = m_PickedPoint.Y >> (int)m_TexDisplay.mip;
|
||||
|
||||
PixelHistoryView hist = new PixelHistoryView(m_Core, CurrentTexture, new Point(x, y), m_TexDisplay.sampleIdx,
|
||||
m_TexDisplay.rangemin, m_TexDisplay.rangemax,
|
||||
new bool[] { m_TexDisplay.Red, m_TexDisplay.Green, m_TexDisplay.Blue, m_TexDisplay.Alpha });
|
||||
|
||||
@@ -2981,7 +2984,7 @@ namespace renderdocui.Windows
|
||||
Thread.Sleep(100);
|
||||
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
|
||||
{
|
||||
history = r.PixelHistory(CurrentTexture.ID, (UInt32)m_PickedPoint.X, (UInt32)m_PickedPoint.Y, m_TexDisplay.sampleIdx);
|
||||
history = r.PixelHistory(CurrentTexture.ID, (UInt32)x, (UInt32)y, m_TexDisplay.sliceFace, m_TexDisplay.mip, m_TexDisplay.sampleIdx);
|
||||
|
||||
this.BeginInvoke(new Action(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user