Ejemplo n.º 1
0
 public static void SuspendEffects(bool suspend)
 {
     instance.ApplyOcclusion((!suspend) ? instance.occlusion : AmbientOcclusionMode.None);
     instance.ApplyEffect <AutoExposure>(instance.allowExposure && !suspend);
     instance.ApplyEffect <DepthOfField>(instance.allowDepthOfField && !instance.blockBlur && !suspend);
     instance.ApplyEffect <Bloom>(instance.allowBloom && !suspend);
     instance.ApplyEffect <ChromaticAberration>(instance.allowChromaticAberration && !suspend);
     instance.ApplyEffect <ColorGrading>(!suspend);
     instance.ApplyEffect <Vignette>(!suspend);
     for (int i = 0; i < instance.activeCameras.Count; i++)
     {
         if (instance.activeCameras[i].depthOfField != null)
         {
             instance.activeCameras[i].depthOfField.enabled.Override(instance.allowDepthOfField && !instance.blockBlur && !suspend);
         }
     }
     if (instance.postProfile.TryGetSettings(out ColorGrading outSetting))
     {
         outSetting.enabled.Override(!suspend);
     }
     for (int j = 0; j < instance.activeCameras.Count; j++)
     {
         instance.activeCameras[j].camera.depthTextureMode = DepthTextureMode.None;
     }
 }