using UnityEngine; using UnityEngine.Rendering; namespace VolumetricFogAndMist { public class DemoDepthBlur : MonoBehaviour { private void Start() { GameObject gameObject = GameObject.Find("Elephant"); gameObject.GetComponent().shadowCastingMode = ShadowCastingMode.On; } private void Update() { VolumetricFog instance = VolumetricFog.instance; if (Input.GetKeyDown(KeyCode.T)) { instance.fogBlur = !instance.fogBlur; } } private void OnGUI() { Rect position = new Rect(10f, 10f, Screen.width - 20, 30f); GUI.Label(position, "Press T to toggle depth blur on/off."); } } }