Update custom pass to global custom pass

This commit is contained in:
Misaki
2024-10-23 20:15:07 +09:00
parent e441bb7911
commit d0554a73bb
64 changed files with 949 additions and 46128 deletions

View File

@@ -0,0 +1,22 @@
using UnityEngine;
[ExecuteInEditMode]
public class UTSMeshRenderer : MonoBehaviour
{
private const string Shader_Prop_Object_Center_Name = "_ObjectCenterPositionWS";
public Material material;
public Transform objectCenter;
private void Update()
{
if (material == null)
return;
if (objectCenter != null)
{
material.SetVector(Shader_Prop_Object_Center_Name, objectCenter.position);
}
}
}