How could I make a post processing portal/window?

Here is a screenshot from Viewfinder of the effect I want.


I don’t need to be able to walk through the portals and have the effect spread to the entire world, as that would make things needlessly complex. I just want to have a sort of window you can look through and see the world with a different post process effect. I managed to isolate a post process material to a particular object with an if/comparison node between the custom depth and scene depth buffer, but that only applies a filter to a particular object. I want to be able to see the world through the object like a mask. Also, objects seem to stop contributing to the custom depth buffer when I add a fully transparent material to them (presumably by design), so that method won’t work either… Any advice?

Solved: My approach was wrong. I forgot you could access the scene color from a translucent material, so I guess I can just do all the effects in separate translucent materials, then apply an identical post process material when you walk through it.