VladimirPirozhenko 6889a11109 Added surface shaders for additive blending,emission and cutoff, also upgraded standard curved shader massively
Fixed shadows with shader, optimized few things for mobiles, added CulledCamera script to prevent meshes to dissapear in front of camera
WorldCurver now lives in GameSession, from which it will be controlled
2022-08-18 03:37:06 +03:00

25 lines
574 B
C#

using UnityEngine;
[ExecuteInEditMode]
public class WorldCurver : MonoBehaviour
{
[Range(-0.1f, 0.1f)]
public float curveStrengthY = 0.01f;
[Range(-0.1f, 0.1f)]
public float curveStrengthX = 0.01f;
private int curveStrengthXID;
private int curveStrengthYID;
private void OnEnable()
{
curveStrengthYID = Shader.PropertyToID("_CurveStrength_y");
curveStrengthXID = Shader.PropertyToID("_CurveStrength_x");
}
public void Tick()
{
Shader.SetGlobalFloat(curveStrengthYID, curveStrengthY);
Shader.SetGlobalFloat(curveStrengthXID, curveStrengthX);
}
}