See objects only when looking a object with a certain shader?

I want a sort of “lens” which let’s you see objects which have a specific layer which the camera can’t see otherwise when looking through said “lens”. Basically, a shader when you look through it which changes the Culling Mask of the camera only for that space.
If it’s not clear what I mean (or there maybe is a simple way of achieving it I didn’t think of) let me give an example: Imagine a tube you can look at from different angles. When looking in the holes you see a room which is bigger on the inside. From the outside you can’t see it because it’s on a different layer, but at the holes of the tube are said “lenses”.
The closest thing I found to my problem was the first answer of this: how to programmatically allow Unity Shader to control which object renders in front? - Stack Overflow

Any help appreciated

Did you ever find a solution to this?