Object pit wit a stencil buffer

The stencil buffer allows to make a part of the object invisible

Shader source :

Mask :

https://pastebin.com/7QNAmzAy

Object to pit :

https://pastebin.com/XvLSQXdG