shader in opaque mode not receiving directional light

i created this shader for my road but it is not receiving light from the sun so it looks unnaturally dark and has no shadows cast on it.

shader in opaque mode:


same shader in transparent mode:

any help is appreciated

Update: deleted the old directional light and created a new one, now it works fine.