Guest User

DirectionalLightShader

a guest
Oct 26th, 2020
1,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.22 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. [ExecuteInEditMode]
  4. public class DirectionalLightShader : MonoBehaviour
  5. {
  6.  
  7.     void Update()
  8.     {
  9.         Shader.SetGlobalVector("_LightDirectionVec", -transform.forward);
  10.        
  11.     }
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment