Shader to overlap objects

Hey. Anyone has a shader that can block certain objects? Perhaps for this need 2 shaders, where 1 will overlap another, but will not overlap other objects without this shader?

I guess what you’re looking for is a stencil shader. The stencil buffer is similar to the color or depth buffer. You can fill it and do comparions on the buffer. Take a look at this repo: GitHub - supyrb/ConfigurableShaders: Showing off the power of shader properties in Unity

Thanks!