Guest User

MainLight.hlsl

a guest
Oct 3rd, 2019
9,735
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void GetLightingInformation_float(out float3 Direction, out float3 Color,out float Attenuation)
  2. {
  3. #ifdef SHADERGRAPH_PREVIEW
  4. Direction = float3(-0.5,0.5,-0.5);
  5. Color = float3(1,1,1);
  6. Attenuation = 0.4;
  7. #else
  8. Light light = GetMainLight();
  9. Direction = light.direction;
  10. Attenuation = light.distanceAttenuation;
  11. Color = light.color;
  12. #endif
  13. }
RAW Paste Data Copied