How to include additional lights in a stylized unlit URP shadergraph?

Hi, by following a lot of tutorials and doing a lot of experimenting, I managed to make an unlit shader that I think is pretty cool to use in my games, I was bored of always using a simple toon shader and only copying tutorials, while I still don’t know any hlsl, I managed to build the shadergraph mostly all by myself, here’s some examples of what I could make with just messing around with material surface inputs, and on the right is the preview of the additional lights setup I want to add on top:

Everything was smooth sailing until I tried to get it to support those additional lights, I followed a couple of tutorials, particularly this one by Daniel Ilett: https://www.youtube.com/watch?v=F8bAI6dIrto

Up until the part where he automates the process in the script, before attempting to do that, I wanted to get it to work for at least one additional light inside shader graph to see if it looks like I would want it to look, which is more or less like the node setup in the previous image.

This setup was made with a custom function using the additional lights that were added to the hlsl script as the tutorial showed, but no matter what I try I can’t get this to be reflected on the material once I pug it into the base color either an an add node with the rest of the setup, or on it’s own just to see if it’ll work at all, all I get is a black material. I know I must be doing something wrong but I don’t know what it is, graph settings and such is all on default, I already checked that additional lights are set to per pixel in the URP asset like I saw suggested elsewhere. Any help is greatly appreciated and thanks for your time.

Hi,

I suggest you take a look at the Custom Lighting samples we’ve added in Unity 6.3.

Hope this helps.