DemoDepthBlur.cs 673 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. using System.Collections;
  3. namespace VolumetricFogAndMist {
  4. public class DemoDepthBlur : MonoBehaviour {
  5. void Start () {
  6. // This is for the sprite test: enable shadows on the elephant - SpriteRenderer has shadows disabled by default
  7. GameObject elephant = GameObject.Find ("Elephant");
  8. elephant.GetComponent<Renderer> ().shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
  9. }
  10. void Update () {
  11. VolumetricFog fog = VolumetricFog.instance;
  12. if (Input.GetKeyDown (KeyCode.T)) {
  13. fog.fogBlur = !fog.fogBlur;
  14. }
  15. }
  16. }
  17. }