Unity developer/3D Shader Developer need for implementing stencil buffer in Unity's HDRP

Job ID: 32957744

Budget: $8 – $15 USD

develop a custom shader that will allow me to 'cut' one subtractive mesh (B) from another solid mesh (A). The object 'A' will have the appearance of Unity's HDRP's 'standard' shader. Object 'B' will appear invisible and not cast shadow, but if it intersects Object 'A', it will produce a subtractive 'cut', revealing the interior faces along the cut surface. The cut surface is drawn with a second material (or pass) that includes a separate set of textures, but implements the functionality of HDRP's 'standard' shader (allow maps for diffuse, metal, smoothness, normal). I imagine implementing this with use of stencil buffers, to draw the inside faces of one object only where it intersects another object. There is a great example of this on this at the bottom of this Unity shader documentation page: https://docs.unity3d.com/2020.1/Documentation/Manual/SL-Stencil.html Due to the complexity of the geometry, I do not think this particular project would be a good fit for boolean operations on the mesh, or using a volumetric approach (ray-marching, SDF, marching cubes, etc.), but I am willing to entertain ideas on alternate approaches to accomplish the same goal.

I also wanted to pass along this example github project which makes an attempt at stencil buffers in HDRP, as well as this original link to the Unity shader docs, which includes a similar stencil buffer implementation. I'm hoping these will provide you with a good starting point for your work.
Related categories: C# Programming Unity 3D