Allow displaying any semantics as 'position' on mesh output view

* This means you can visualise the UVs directly, not just as a colour
  on the regular mesh.
This commit is contained in:
baldurk
2014-12-20 19:54:52 +00:00
parent 3dd6d7d296
commit 0df6e36ff5
4 changed files with 31 additions and 16 deletions
+1
View File
@@ -383,6 +383,7 @@ namespace renderdoc
public UInt32 highlightVert;
public MeshFormat position;
public MeshFormat secondary;
public bool unproject;
public FloatVector prevMeshColour = new FloatVector();
public FloatVector currentMeshColour = new FloatVector();
+8 -2
View File
@@ -2208,6 +2208,13 @@ namespace renderdocui.Windows
m_MeshDisplay.position.compType = pos.format.compType;
m_MeshDisplay.position.specialFormat = pos.format.special ? pos.format.specialFormat : SpecialFormat.Unknown;
m_MeshDisplay.position.showAlpha = false;
m_MeshDisplay.unproject = false;
if ((ui.m_Stage == MeshDataStage.VSOut && !m_Core.CurPipelineState.IsTessellationEnabled) || ui.m_Stage == MeshDataStage.GSOut)
{
m_MeshDisplay.unproject = pos.name.ToUpperInvariant() == "SV_POSITION";
}
}
if (ui.m_Input == null || ui.m_Input.BufferFormats == null ||
@@ -2408,13 +2415,12 @@ namespace renderdocui.Windows
if (m_Core.LogLoaded && MeshView)
{
m_ContextUIState = GetUIState(sender);
bool input = (m_ContextUIState == m_VSIn);
if (e.Button == MouseButtons.Right &&
m_ContextUIState.m_Input != null &&
m_ContextUIState.m_Input.BufferFormats != null)
{
selectColumnAsPositionToolStripMenuItem.Visible = input;
selectColumnAsPositionToolStripMenuItem.Visible = true;
selectAlphaAsSecondaryToolStripMenuItem.Visible = true;
m_ContextColumn = 0;