mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 07:56:33 +00:00
Don't use the W from VS input (and VS out with geom/tess) positions
* This allows W to be filled with 1.0 which our mesh viewing shader expects to have to be able to multiply by the MVP matrix.
This commit is contained in:
@@ -3154,6 +3154,7 @@ void BufferViewer::UI_CalculateMeshFormats()
|
||||
}
|
||||
|
||||
m_VSInPosition.format = prop.format;
|
||||
m_VSInPosition.format.compCount = qMin((uint8_t)3, m_VSInPosition.format.compCount);
|
||||
}
|
||||
|
||||
elIdx = m_ModelVSIn->secondaryColumn();
|
||||
@@ -3208,7 +3209,11 @@ void BufferViewer::UI_CalculateMeshFormats()
|
||||
// if geometry/tessellation is enabled, don't unproject VS output data
|
||||
if(m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() ||
|
||||
m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId())
|
||||
{
|
||||
m_PostVSPosition.unproject = false;
|
||||
// ignore any W component that might be there, let it be filled in with 1.0
|
||||
m_PostVSPosition.format.compCount = qMin((uint8_t)3, m_VSInPosition.format.compCount);
|
||||
}
|
||||
|
||||
elIdx = m_ModelVSOut->secondaryColumn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user