Exemple #1
0
        public void InitCamera()
        {
            this.needsReinitialisation = false;
            if (this.ActiveGlow)
            {
                this.DestroyCamera();
            }
            this.glowObj.SetActive(true);
            IBlur blur = null;

            this.useRt = false;
            BlurMode blurMode = this.blurMode;

            if (blurMode != BlurMode.Default)
            {
                if (blurMode != BlurMode.Advanced)
                {
                    if (blurMode != BlurMode.HighQuality)
                    {
                        if (blurMode == BlurMode.UnityBlur)
                        {
                            blur = new UnityBlur();
                        }
                    }
                    else
                    {
                        blur = new HqBlur();
                    }
                }
                else
                {
                    blur = new AdvancedBlur();
                }
            }
            else
            {
                blur = new DefaultBlur();
            }
            this.glowCam.enabled = false;
            if (this._reuseDepth && QualitySettings.antiAliasing == 0)
            {
                this.reuseDepthDisabled = false;
                this.ActiveGlow         = this.glowCam.gameObject.AddComponent <GlowCameraReuse>();
            }
            else
            {
                this.reuseDepthDisabled = true;
                this.useRt      = true;
                this.ActiveGlow = this.glowCam.gameObject.AddComponent <GlowCameraRerenderOnly>();
            }
            this.ActiveGlow.glow11        = this;
            this.ActiveGlow.cullingMask   = this.cullingMask;
            this.ActiveGlow.highPrecision = this._highPrecsionActive;
            this.ActiveGlow.parentCamera  = base.GetComponent <Camera>();
            this.ActiveGlow.blur          = blur;
            this.ActiveGlow.settings      = this.settings;
            this.ActiveGlow.Init();
        }
Exemple #2
0
        public void InitCamera()
        {
            if (ActiveGlowOutLine != null)
            {
                DestroyCamera();
            }

            GlowOutLineObj.SetActive(true);

            //switch (blurMode)
            //{
            //    case BlurMode.Default:
            //        blur = new DefaultBlur();

            //        break;

            //    //case BlurMode.Advanced:
            //    //    blur = new AdvancedBlur();
            //    //    break;

            //    case BlurMode.HighQuality:
            //        blur = new HqBlur();
            //        break;

            //    case BlurMode.UnityBlur:
            //        blur = new UnityBlur();
            //        break;
            //}

            blur = new GlowOutLineBlur();
            GlowOutLineCam.enabled = false;
            m_GlowOutLineCamReuse  = GlowOutLineCam.gameObject.AddComponent <GlowOutLineCameraReuse>();

            ActiveGlowOutLine = m_GlowOutLineCamReuse;
            ActiveGlowOutLine.glowOutLineManager = this;
            ActiveGlowOutLine.highPrecision      = _highPrecsionActive;
            ActiveGlowOutLine.parentCamera       = HostCamera;
            ActiveGlowOutLine.blur     = blur;
            ActiveGlowOutLine.settings = settings;
            ActiveGlowOutLine.Init();
        }
Exemple #3
0
        public void InitCamera()
        {
            if (ActiveDissloveGlow != null)
            {
                DestroyCamera();
            }

            DissloveObj.SetActive(true);

            switch (blurMode)
            {
            case BlurMode.Default:
                blur = new DissloveDefaultBlur();

                break;

                //case BlurMode.Advanced:
                //    blur = new AdvancedBlur();
                //    break;

                //case BlurMode.HighQuality:
                //    blur = new HqBlur();
                //    break;

                //case BlurMode.UnityBlur:
                //    blur = new UnityBlur();
                //    break;
            }

            DissloveCam.enabled    = false;
            m_DissloveGlowCamReuse = DissloveCam.gameObject.AddComponent <DissloveGlowCameraReuse>();

            ActiveDissloveGlow = m_DissloveGlowCamReuse;
            ActiveDissloveGlow.dissolveGlowManager = this;
            ActiveDissloveGlow.highPrecision       = _highPrecsionActive;
            ActiveDissloveGlow.parentCamera        = HostCamera;
            ActiveDissloveGlow.blur     = blur;
            ActiveDissloveGlow.settings = settings;
            ActiveDissloveGlow.Init();
        }
 public void SetControlledObject(object item)
 {
     try
     {
         if (item != null && item is IBlur)
         {
             m_Item = (IBlur)item;
             FillControls();
             if (item is IChangeNotify)
             {
                 ((IChangeNotify)item).ItemChanged += External_ItemChanged;
             }
             this.Enabled = true;
         }
         else
         {
             ClearControls();
             this.Enabled = false;
         }
     }
     catch (System.Exception) { }
 }