diff --git a/LegacyContentMitigation/Components/FakeMultiPassHack.cs b/LegacyContentMitigation/Components/FakeMultiPassHack.cs index 31924db..fcc7169 100644 --- a/LegacyContentMitigation/Components/FakeMultiPassHack.cs +++ b/LegacyContentMitigation/Components/FakeMultiPassHack.cs @@ -207,9 +207,11 @@ public class FakeMultiPassHack : MonoBehaviour eyeCamera.targetTexture = targetTexture; eyeCamera.cullingMask = CachedCullingMask; eyeCamera.stereoTargetEye = StereoTargetEyeMask.None; + eyeCamera.cullingMatrix = _mainCamera.cullingMatrix; eyeCamera.projectionMatrix = _mainCamera.GetStereoProjectionMatrix(eye); eyeCamera.worldToCameraMatrix = _mainCamera.GetStereoViewMatrix(eye); eyeCamera.Render(); + eyeCamera.ResetCullingMatrix(); } } diff --git a/LegacyContentMitigation/Main.cs b/LegacyContentMitigation/Main.cs index 8db0910..5d1c1b9 100644 --- a/LegacyContentMitigation/Main.cs +++ b/LegacyContentMitigation/Main.cs @@ -33,6 +33,7 @@ public class LegacyContentMitigationMod : MelonMod ApplyPatches(typeof(Patches.CVRWorld_Patches)); // post processing shit ApplyPatches(typeof(Patches.CVRTools_Patches)); // prevent shader replacement when fix is active ApplyPatches(typeof(Patches.HeadHiderManager_Patches)); // prevent main cam triggering early head hide + ApplyPatches(typeof(Patches.CVRMirror_Patches)); InitializeIntegration("BTKUILib", Integrations.BtkUiAddon.Initialize); // quick menu options } diff --git a/LegacyContentMitigation/Patches.cs b/LegacyContentMitigation/Patches.cs index e2dabaf..2b151e8 100644 --- a/LegacyContentMitigation/Patches.cs +++ b/LegacyContentMitigation/Patches.cs @@ -6,6 +6,8 @@ using ABI_RC.Core.Player; using ABI_RC.Core.Player.LocalClone; using ABI_RC.Core.Player.TransformHider; using ABI.CCK.Components; +using cohtml; +using cohtml.Net; using HarmonyLib; using UnityEngine; using UnityEngine.Rendering.PostProcessing; @@ -125,4 +127,15 @@ internal static class HeadHiderManager_Patches transformHiderManager._resetAfterThisRender = flag; } } +} + +internal static class CVRMirror_Patches +{ + [HarmonyPostfix] + [HarmonyPatch(typeof(CVRMirror), nameof(CVRMirror.CopyCameraProperties))] + private static void Postfix_CVRMirror_CopyCameraProperties(ref CVRMirror __instance) + { + __instance.m_ReflectionCamera.ResetCullingMatrix(); + } + } \ No newline at end of file diff --git a/LegacyContentMitigation/Properties/AssemblyInfo.cs b/LegacyContentMitigation/Properties/AssemblyInfo.cs index e460687..5969d71 100644 --- a/LegacyContentMitigation/Properties/AssemblyInfo.cs +++ b/LegacyContentMitigation/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.LegacyContentMitigation.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.1"; + public const string Version = "1.0.2"; public const string Author = "Exterrata & NotAKidoS"; } \ No newline at end of file