Rasagar/Packages/com.occasoftware.super-simple-skybox/Runtime/SkyObjects/Sun.cs

15 lines
360 B
C#
Raw Normal View History

2024-09-01 13:42:24 -07:00
using UnityEngine;
namespace OccaSoftware.SuperSimpleSkybox.Runtime
{
[AddComponentMenu("OccaSoftware/Super Simple Skybox/Sun")]
public class Sun : DirectionalLight
{
protected override void Update()
{
base.Update();
Shader.SetGlobalVector(ShaderParams._SunDirection, -transform.forward);
}
}
}