Post processing materials to see teammates?

So, I want to make a system (similar to Valorant’s) where you can see your teammates through walls while enemies can’t. Is there a way to make it so that you can turn on certain post processing materials so only you can see teammates through walls? Would I control this locally?

You can look into Custom Depth - official documentation and a tutorial.