From d0996b4011e4a8d113830261c4f0688699bea5ee Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:26:49 +0000 Subject: [PATCH] Fixed post processing --- QSB/Instruments/QSBCamera/CameraManager.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/QSB/Instruments/QSBCamera/CameraManager.cs b/QSB/Instruments/QSBCamera/CameraManager.cs index c96a88e4..1f562c02 100644 --- a/QSB/Instruments/QSBCamera/CameraManager.cs +++ b/QSB/Instruments/QSBCamera/CameraManager.cs @@ -1,6 +1,7 @@ using OWML.Common; using QSB.Utility; using UnityEngine; +using UnityEngine.PostProcessing; namespace QSB.Instruments.QSBCamera { @@ -63,9 +64,6 @@ namespace QSB.Instruments.QSBCamera var fogImage = CameraObj.AddComponent(); fogImage.fogShader = Locator.GetPlayerCamera().gameObject.GetComponent().fogShader; - //var postProcessing = CameraObj.AddComponent(); - //postProcessing.profile = Locator.GetPlayerCamera().gameObject.GetAddComponent().profile; - CameraBase.SetActive(true); IsSetUp = true; @@ -90,7 +88,12 @@ namespace QSB.Instruments.QSBCamera } OWInput.ChangeInputMode(InputMode.None); GlobalMessenger.FireEvent("SwitchActiveCamera", OWCamera); - Locator.GetActiveCamera().mainCamera.enabled = false; + Locator.GetPlayerCamera().mainCamera.enabled = false; + if (CameraObj.GetComponent() == null) + { + var postProcessing = CameraObj.AddComponent(); + postProcessing.profile = Locator.GetPlayerCamera().gameObject.GetComponent().profile; + } Camera.enabled = true; Mode = CameraMode.ThirdPerson; }