Shader Graph Material shown in pink

Hi, I’m starting to study shaders a bit, and I’m following different tutorials and so on.
I use version 2019.4.12f1 HDRP, and the problem comes to me that “light” and “Light” appear unrecognizable, and the shader is pink.
Attached screenshot of the .hlsl text and errors.
How could I solve it?
Thanks in advance.


Your code is working fine with the Universal Render Pipeline for me. If you are just playing with shaders in order to learn new stuff and Render Pipeline is not important, you could switch to URP and go on with the tutorial.

As far as I can tell “Light”, “GetMainLight()” and “LightingSpecular()” are defined in a file called Lighting.hlsl which is part of the Universal Render Pipeline. So you cannot use them in HDRP.

If you want / need to stick with HDRP have a look at these posts, maybe you find something useful / practicable there (I have not tried them myself):

There could be other posts etc. out there, these are just the first two I found useful.