Tutorial on how to create a custom get main light direction node in Unity Shader graph. #shaders #shadergraph #unity
The code mentioned in the video:
#if SHADERGRAPH_PREVIEW
Direction = half3(0.5, 0.5,0);
Color = 1;
#else
Light light = GetMainLight();
Direction = light.direction;
Color = light.color;
#endif