mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-04 05:41:06 +00:00
VK 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:
@@ -1644,6 +1644,24 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
|
||||
if(overlay == DebugOverlay::Depth)
|
||||
useDepthWriteStencilPass = true;
|
||||
|
||||
if(useDepthWriteStencilPass)
|
||||
{
|
||||
useDepthWriteStencilPass = false;
|
||||
const VulkanCreationInfo::Pipeline::Shader &ps = pipeInfo.shaders[4];
|
||||
if(ps.module != ResourceId())
|
||||
{
|
||||
ShaderReflection *reflection = ps.refl;
|
||||
if(reflection)
|
||||
{
|
||||
for(SigParameter &output : reflection->outputSignature)
|
||||
{
|
||||
if(output.systemValue == ShaderBuiltin::DepthOutput)
|
||||
useDepthWriteStencilPass = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VkAttachmentDescription attDescs[] = {
|
||||
{0, overlayFormat, VK_SAMPLE_COUNT_1_BIT, VK_ATTACHMENT_LOAD_OP_LOAD,
|
||||
VK_ATTACHMENT_STORE_OP_STORE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
|
||||
|
||||
Reference in New Issue
Block a user