I'm building a mixed reality application that create some portal trough walls. In the first picture attached I have 2 wall with 2 different shader but I need to use both on 1 wall:
The first wall with the hole at the center have a shader that allow me to create at runtime a hole and move it to see what is behind the wall The second wall that looks like a black wall actually it's a shader that allow in mixed reality application to have invisible wall that cover all objects behind it, is very useful in mixed reality because allow me to cover object behind a invisible wall.
In my application I need a invisible wall that cover all the objects behind it and also can create a portal on it, so it's a fusion between the 2 shaders already have. I'm not really great with shader and I think I have to use Stencil (maybe?), someone can tell me some tips to merge togheter this 2 shader or some workaround?


You can use the cracked mesh and using the script you can disable that crack of the mesh. Set you camera to skybox, Enable the passthrough and you have to write custom shader(Opaques and render queue is 2000) which is use to set you passthrough over wall and ceilings and floor. create material for that shader and apply that material to all the crack meshes and all set. Now you have to write logic to disable the mesh of the crack. And for the lights you have to fake it by creating a mesh and on that mesh you have to use your custom shader which draw lines on the mesh. Here is Sample for the shader.