A "no render zone" shader ?

Hi, I was wondering if it was at all possible to have a shader act as if it was the camera’s background (texture or skybox or anything).

What I mean is, I want there to be “empty” spaces in the camera’s view where the objects with this shader appear, even if there is an object behind it.

There’s similar things in softwares like Maya, so I was wondering.

Is it at all possible ?

Thanks in advance.

There’s several ways to do this - one approach is to use the stencil buffer.