I could be wrong, but that shader still wouldn’t support shadows, right?
All I’m seeing right now are a bunch of hacks to get “almost there” with anything you want to do, but there still isn’t enough functionality to get all the way there. Custom lighting seems to be an example of this.
So what i’ve just done is to open up the Lighting.hlsl file in the pipeline package and do the modifications that are done in shader graph to the ‘LightingPhysicallyBased’ (toon ramp NdotL with smoothstep) and ‘DirectBDRF’ (similar for the specularity) methods.
Essentially updating the lighting model URP is using for their Lit shader.
This way you take advantage of everything the shader has to offer re:lighting,shadows, GI, etc. without having to implement it yourself and its only as expensive as every line you add rather than being on top of the current shader workload which spends the whole time arriving at 0 for each pixel.
It also JustWorks™ for additional lights too and should follow all the settings in the pipeline assets.
Yes you have to read and write the hlsl, but most of the functions and logic you need are identical to those you’ll use in shader graph anyway and its pretty much all in this one file.