// Update is called once per frame void Update() { if (mist && value < 1) { value += Time.deltaTime * 0.1f; Graph.SetInputFloat("Normal", value); Graph.SetInputFloat("Roughness", value); Graph.QueueForRender(); Graph.RenderSync(); } if (!mist && value > 0) { value -= Time.deltaTime * 0.1f; Graph.SetInputFloat("Normal", value); Graph.SetInputFloat("Roughness", value); Graph.QueueForRender(); Graph.RenderSync(); } }
// Start is called before the first frame update void Start() { Graph.SetInputFloat("WaterLevel1", 0); Graph.SetInputFloat("WaterLevel2", 0); Graph.SetInputFloat("Change_0_1", 1); }