示例#1
0
        public static void UnBlurCamera(Camera camera)
        {
            if (camera == null)
            {
                return;
            }

            Effect.BlurOptimized blur = camera.gameObject.GetComponent <Effect.BlurOptimized>();
            if (blur != null)
            {
                blur.enabled = false;
            }
        }
示例#2
0
        public static void BlurCamera(Camera camera)
        {
            if (camera == null)
            {
                return;
            }

            Effect.BlurOptimized blur = camera.gameObject.GetComponent <Effect.BlurOptimized>();
            if (blur == null)
            {
                blur            = camera.gameObject.AddComponent <Effect.BlurOptimized>();
                blur.blurShader = Shader.Find("Hidden/FastBlur");
            }

            blur.enabled = true;
        }