I think I may have found a duplicate stencil buffer clear call.
PostProcessDeferredDecals.cpp, around line 773:
// we don't modify stencil but if out input was having stencil for us (after base pass - we need to clear)
// Clear stencil to 0, which is the assumed default by other passes
RHICmdList.Clear(false, FLinearColor::White, false, (float)ERHIZBuffer::FarPlane, true, 0, FIntRect());
DeferredShadingRenderer.cpp, around line 1254:
// Clear stencil to 0 now that deferred decals are done using what was setup in the base pass
// Shadow passes and other users of stencil assume it is cleared to 0 going in
RHICmdList.SetRenderTargetsAndClear(Info);
If I’m not mistaken, the PostProcessDeferredDecals clear occurs just before the DeferredShadingRenderer clear, making the earlier clear unnecessary. Does that seem correct, or am I missing something?