Hi!
So I have a PP Material, Outline. It makes all meshes in game have a black outline around them. What I want to do, is to disable this outline if a surface that has an outline is behind something.
Hard to explain so I will paint it:
Black lines are meshes with outline, red lines is something, blue lines have disabled outline and they are behind the mesh (behind red lines object).
Is it somehow possible to do?
Why do I need it:
I want to achieve translucency effect with masked material using dither aa node, but because of the outlines, the “red lines object” becomes dark and ugly and totally not translucent:

What I tried to solve the problem is to disable the outlines depending on the distance from the player. It works, but removes some outlines, which is not ideal:

As you can see the flowers and grass in the background have no outlines.
So I was thinking about disabling outlines only if the surface is behind something.
Or maybe there is another solution I dont know of.
Please help
