Terrain Shadergraph stopped being affected by ambient lighting

Hello !
I am using URP to build a game which requires a custom lit Shadergraph for the terrain. I am currently facing issues whereby the shadergraph doesn’t actually process the ambient lighting information properly, leading to very dark, black, shadows and other ‘pale’ lighting on the surface. What is very strange is that when I first set up a custom lit URP shadergraph for my terrain, the shadows seemed to work properly. Please let me walk you through my issues and debugging so far

  1. First Version

Originally the shadergraph was very simple - a placeholder - taking world position in x,z to sample a noise, whose value was used to lerp between colors. I used this while testing other aspects of the game. Here is a screenshot that shows it working before. The terrain is the floor under the red character. Notice how this is a properly lit shader, with shadows that have the same tint as the other objects in the scene

  1. Updated Version

I then came back to my lit shadergraph and modified it significantly - primarily trying to add footprints in the snow. This meant adding 25 textures, 25 2D vectors, and a bunch of math to basically handle tiling of different textures and displaying that on the terrain. During this process, the color of the terrain was usually set to allow for debugging - so I’m not sure when things stopped working. But by the time I stopped it looked like the following. Notice how the shadows are just black, and changing the lighting settings causes all other shadows to change except these ones. Duplicating the directional light does seem to brighten up the shadows lightly - but that’s about it… I also started getting a warning message in my Terrain: “The provided Material’s shader might unsuitable for use with Terrain in the active render pipeline. We recommend you use Universal Render Pipeline/Terrain/Lit instead”.

  1. Debugging through alternatives

I first tried debugging by playing around with the Material properties (Lit, Metallic, Opaque, etc.) to no avail. I tried simplifying my shader by cutting stuff out, but again didn’t work. I even created a new lit shadergraph with default properties and create a new material. Someone mentioned needing to pre-bake the lighting information while using the default terrain shader then swapping the material out - that also didn’t work. I’ve heard some say it relates to URP not passing the lighting information to custom shadergraphs, but then it doesn’t explain why it used to work in my very first version…

Ultimately, I don’t understand why #1 had no problem but now it’s struggling with all custom shadergraph. If anyone has a solution I would be very greatful. Thank you very much!

Seemed to be a bug in URP/shadergraph. I recreated the shadergraph from scratch but identical, and it now responds appropriately to lighting…