[Add] All in one shader

This commit is contained in:
2026-02-23 22:01:07 +07:00
parent ec0aa86ac2
commit 4f942cd7c0
806 changed files with 401510 additions and 33 deletions
@@ -0,0 +1,20 @@
using UnityEngine;
namespace AllIn13DShader
{
[ExecuteInEditMode]
public class ShaderGlobalTimeController : MonoBehaviour
{
private readonly int globalTimePropertyID = Shader.PropertyToID(ConstantsRuntime.GLOBAL_PROPERTY_GLOBAL_TIME);
private Vector4 timeVector;
private void Update()
{
timeVector.x = Time.unscaledTime / 20f;
timeVector.y = Time.unscaledTime;
timeVector.z = Time.unscaledTime * 2f;
timeVector.w = Time.unscaledTime * 3f;
Shader.SetGlobalVector(globalTimePropertyID, timeVector);
}
}
}