I was doing this Toon Shader tutorial (is in spanish but have english captions) in a project where I test things, and Im having some trouble with the Shader Graph.
At first my script didn´t work with the first node, then remade the Script from scratch and worked until I connected Floor node to Fragment node (this part of the tutorial) since then, console shows me the same text it sent me the first time I made the code and doesn´t let me continue:
Searched for an answer, some says that is an Unity bug, but IDK. I´m relatively new with code, I understand some logic but I´m not familiar with technical language, so can´t solve the problem.
This is my code (Visual Studio doesn´t show line numbers for some reason since it failed):
#ifndef MAINLIGHT_INCLUDED
#define MAINLIGHT_INCLUDED
void GetMainLightData_float(out half3 direction, out half3 color)
{
#ifdef SHADERGRAPH_PREVIEW
direction = half3(-0.3, -0.8, 0.6);
color = half3(1, 1, 1);
#else
#if defined(UNIVERSAL_LIGHTNING_INCLUDED)
Light mainLight = GetMainLight();
direction = mainLight.direction;
color = mainLight.color;
#endif
#endif
}
#endif
Hope you know what´s happening.
