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; } }
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; } }
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; } }
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; } } }
private void OnEnable() { this.sunshineCamera = base.GetComponent<SunshineCamera>(); }
void OnEnable() { sunshineCamera = GetComponent<SunshineCamera>(); }
private void OnEnable() { this.sunshineCamera = base.GetComponent <SunshineCamera>(); }
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; } }
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; } } }