Download

How to render this post-process effect in the proper z-order?

The idea here is to render an emissive glow around the outline of an object.
But for now, I’m simply working on the outline itself.
This is my current material setup (originally taken from HERE):
pUdtGO2.png

Here’s what my scene looks like before applying the material:
XgAeeYk.png

After applying the material to a Post Process Volume and enabling Set Render Custom Depth in my test mesh’s blueprint, this is the effect I get:
2BHhmwg.png

And I would happily take the effect as-is and use it in my project, if it weren’t for this:
oSZvJEA.png

Ugly, right?
How can I ensure the outline effect is rendered in the proper Z-Order when something is in front of it?