Custom Depth Post-Process Stopped Working in 5.6

I have a post process material that highlights objects within a certain distance to the player. It works fine in 5.5.4 but in 5.6.1, with no changes, it no longer stops highlighting after the object is too far away. Don’t know if something changed or I’m missing the obvious, but I would appreciate any insight anyone has.

5.5.4:

5.6.1:

How I am determining distance, “ItemDistance” is set to 3000 in both cases:

2 Likes

So, I’ve visited this off and on while working on other stuff and I’ve found that the issue is Nanite?

If any of the meshes visible in the scene using custom depth have nanite enabled, then NONE of the meshes in the scene render properly with the distance cutoff. I don’t know if there is some secret setting I don’t know about, but for now I’m just using “Disallow Nanite” for everything I need to be affected.

Would love to know if there is a way to keep Nanite enabled.