mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 14:36:35 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user