These are quite simple to achieve. First, you'll need to create the quant function. Since it will be called from quantToWorld internally, you'll need to toggle on the Auto-Register option. Then its just a mater of looking at the function itself and replicate it's input parameters and return value into the custom expression. Since the function returns a float2 then you need to set the Output Type to float2. Since the function receives two parameters q and v, then you'll need to create two inputs over the custom expression for them and setup their correct Type which is float2 for q and float for v. For quantToWorld the process is similar. First you need to add the quant custom expression as a dependency on the Dependencies section then the rest is similar to what I explained earlier. Here's a screenshot of each one of them and their respective node properties. This is possibly happening because your shader must be writing on the depth buffer. Can you go to your Depth options, turn off ZWrite and let us how it goes? Unfortunately this sample can't be converted to HDRP as it is. There are a couple of nodes on this shader which do not work on HDRP. P.e. the Outline node currently does not work on template based shaders. Also we are not able to retrieve the correct information for Light Attenuation on HDRP. Apologies for the inconvenience.