Advertisement
Guest User

CustomFunctionNodeToonLighting

a guest
Jun 28th, 2019
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. #ifdef LIGHTWEIGHT_LIGHTING_INCLUDED
  2.     Light light = GetMainLight();
  3.     float3 direction = normalize(light.direction);
  4.     float d = dot(Normal, direction);
  5.     float3 ramp = smoothstep(0 ,  ToonRampFuzziness,d )+ (RampColor);
  6.    
  7.     Ramp = light.color * (ramp) * (light.distanceAttenuation
  8.  * 2);
  9.     LightDirection =direction;;
  10. #else
  11.     Ramp = 1,1,1;
  12.     LightDirection = 1,1,0;
  13. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement