D3D12 Depth Overlay use non-stencil mask approach by default

Only use stencil mask approach for depth exporting shaders.
The stencil mask approach does not show discarded pixels as passing.
This commit is contained in:
Jake Turner
2024-01-11 14:42:25 +00:00
parent fe1111340e
commit b04560933e
+15
View File
@@ -2120,6 +2120,21 @@ ResourceId D3D12Replay::RenderOverlay(ResourceId texid, FloatVector clearCol, De
ID3D12Resource *renderDepthStencil = NULL;
bool useDepthWriteStencilPass = (overlay == DebugOverlay::Depth) && renderDepth;
if(useDepthWriteStencilPass)
{
useDepthWriteStencilPass = false;
WrappedID3D12PipelineState::ShaderEntry *wrappedPS = pipe->PS();
if(wrappedPS)
{
ShaderReflection &reflection = pipe->PS()->GetDetails();
for(SigParameter &output : reflection.outputSignature)
{
if(output.systemValue == ShaderBuiltin::DepthOutput)
useDepthWriteStencilPass = true;
}
}
}
HRESULT hr;
DXGI_FORMAT dsFmt = dsViewDesc.Format;
// the depth overlay uses stencil buffer as a mask for the passing pixels