diff --git a/Source/TexturesUnlimitedFXLoader.cs b/Source/TexturesUnlimitedFXLoader.cs index b42fb7c..a6e2e84 100644 --- a/Source/TexturesUnlimitedFXLoader.cs +++ b/Source/TexturesUnlimitedFXLoader.cs @@ -497,13 +497,19 @@ public string GetProfileNameForScene(TUFXScene tufxScene) } } + private PostProcessLayer SetCameraHDR(Camera camera, bool hdr) + { + var layer = camera.gameObject.AddOrGetComponent(); + layer.Init(Resources); + camera.allowHDR = hdr; + return layer; + } + private void ApplyProfileToCamera(Camera camera, TUFXProfile tufxProfile, bool isFinalCamera, bool isPrimaryCamera) { if (camera == null) return; - var layer = camera.gameObject.AddOrGetComponent(); - layer.Init(Resources); - camera.allowHDR = tufxProfile.HDREnabled; + PostProcessLayer layer = SetCameraHDR(camera, tufxProfile.HDREnabled); // In general all postprocessing should be done on the "final" camera - local when in flight, internal when in IVA, etc. // But we don't want to apply TAA (and possibly motion blur and DoF) to anything but the local space camera since @@ -532,6 +538,12 @@ private void ApplyProfile(TUFXProfile profile, TUFXScene tufxScene) mainVolume.sharedProfile = currentProfile.CreatePostProcessProfile(); + Camera galaxyCamera = ScaledCamera.Instance?.galaxyCamera; + if (galaxyCamera != null) + { + SetCameraHDR(galaxyCamera, profile.HDREnabled); + } + if (tufxScene == TUFXScene.Editor) { var editorCameras = EditorCamera.Instance.cam.gameObject.GetComponentsInChildren();