Пример #1
0
    void OnRenderImage(RenderTexture source, RenderTexture destination)
    {
        if(sunshineCamera == null)
            sunshineCamera = GetComponent<SunshineCamera>();

        if(sunshineCamera != null && sunshineCamera.enabled)
            sunshineCamera.OnPostProcess(source, destination);
        else
        {
            //This should never happen! But just in case...
            //Copy the buffer this once, then disable self!
            Graphics.Blit(source, destination);
            enabled = false;
        }
    }
Пример #2
0
 private void OnRenderImage(RenderTexture source, RenderTexture destination)
 {
     if (this.sunshineCamera == null)
     {
         this.sunshineCamera = base.GetComponent<SunshineCamera>();
     }
     if (this.sunshineCamera != null && this.sunshineCamera.enabled)
     {
         this.sunshineCamera.OnPostProcess(source, destination);
     }
     else
     {
         Graphics.Blit(source, destination);
         base.enabled = false;
     }
 }
Пример #3
0
 private void OnRenderImage(RenderTexture source, RenderTexture destination)
 {
     if (this.sunshineCamera == null)
     {
         this.sunshineCamera = base.GetComponent <SunshineCamera>();
     }
     if (this.sunshineCamera != null && this.sunshineCamera.enabled)
     {
         this.sunshineCamera.OnPostProcess(source, destination);
     }
     else
     {
         Graphics.Blit(source, destination);
         base.enabled = false;
     }
 }
Пример #4
0
    private void Update()
    {
        if (!Sunshine.Instance)
        {
            return;
        }
        bool requiresPostprocessing = Sunshine.Instance.RequiresPostprocessing;

        if (this.sunshinePostprocess && this.sunshinePostprocess.enabled != requiresPostprocessing)
        {
            this.sunshinePostprocess.enabled = requiresPostprocessing;
        }
        if (this.StereoscopicMasterCamera != null)
        {
            if (this.StereoscopicMasterCamera.StereoscopicMasterCamera == this)
            {
                this.StereoscopicMasterCamera = null;
            }
            else
            {
                this.AttachedCamera.depth = this.StereoscopicMasterCamera.AttachedCamera.depth + 1f;
            }
        }
    }
Пример #5
0
 private void OnEnable()
 {
     this.sunshineCamera = base.GetComponent<SunshineCamera>();
 }
Пример #6
0
 void OnEnable()
 {
     sunshineCamera = GetComponent<SunshineCamera>();
 }
Пример #7
0
 private void OnEnable()
 {
     this.sunshineCamera = base.GetComponent <SunshineCamera>();
 }
Пример #8
0
 void Update()
 {
     if(!Sunshine.Instance)
         return;
     bool postRequired = Sunshine.Instance.RequiresPostprocessing;
     if(sunshinePostprocess)
     {
         if(sunshinePostprocess.enabled != postRequired)
             sunshinePostprocess.enabled = postRequired;
     }
     if(StereoscopicMasterCamera != null)
     {
         if(StereoscopicMasterCamera.StereoscopicMasterCamera == this)
             StereoscopicMasterCamera = null; // No recursion allowed
         else
             AttachedCamera.depth = StereoscopicMasterCamera.AttachedCamera.depth + 1;
     }
 }
Пример #9
0
 private void Update()
 {
     if (!Sunshine.Instance)
     {
         return;
     }
     bool requiresPostprocessing = Sunshine.Instance.RequiresPostprocessing;
     if (this.sunshinePostprocess && this.sunshinePostprocess.enabled != requiresPostprocessing)
     {
         this.sunshinePostprocess.enabled = requiresPostprocessing;
     }
     if (this.StereoscopicMasterCamera != null)
     {
         if (this.StereoscopicMasterCamera.StereoscopicMasterCamera == this)
         {
             this.StereoscopicMasterCamera = null;
         }
         else
         {
             this.AttachedCamera.depth = this.StereoscopicMasterCamera.AttachedCamera.depth + 1f;
         }
     }
 }