Looking for an advice to how to achieve this Diablo style effect

Not like Diablo though it is just an example I’m sure lots of games have that.I couldnt find a similar example so please forgive me if there is one.

It doesnt show here but when you walk forward and get past that gate the gate becomes transparent if player is hidden behind it. I want to achieve something like that for my top down game.So when player is not visible behind some geometry,I want to apply some Post Processing maybe? to achieve such effect.I can find the geometry that needs to be processed by shooting rays from camera and getting HitResults so thats done,but I dont know how to create a material to apply then.

You can’t do transparency by post processing. You need to swap the material to a transparent one when the player is behind the mesh.