private void InitRes() { if (!ShaderEffectUtils.CheckSupport()) { base.set_enabled(false); return; } if (!this.CreateMaterials()) { this.DestroyMaterials(); base.set_enabled(false); return; } this.m_PP_Holywood = base.get_gameObject().AddMissingComponent <PP_Holywood>(); this.m_PP_Holywood.Initialization(); this.m_PP_Vignette = base.get_gameObject().AddMissingComponent <PP_Vignette>(); this.m_PP_Vignette.Initialization(); this.UpdateRenderTextures(); }
private void EnableVignette(bool isOn) { if (CamerasMgr.MainCameraRoot == null) { return; } if (isOn) { if (GameLevelManager.IsPostProcessReachQuality(250)) { if (this.m_PP_Vignette == null) { this.m_PP_Vignette = CamerasMgr.MainCameraRoot.get_gameObject().AddComponent <PP_Vignette>(); } this.m_PP_Vignette.set_enabled(isOn); this.m_PP_Vignette.Initialization(); } } else if (this.m_PP_Vignette != null) { this.m_PP_Vignette.set_enabled(false); } }