mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
LegacyContentMitigation: fixed culling issue
This commit is contained in:
parent
5c8c724b58
commit
5d77eb61a5
4 changed files with 17 additions and 1 deletions
|
@ -207,9 +207,11 @@ public class FakeMultiPassHack : MonoBehaviour
|
||||||
eyeCamera.targetTexture = targetTexture;
|
eyeCamera.targetTexture = targetTexture;
|
||||||
eyeCamera.cullingMask = CachedCullingMask;
|
eyeCamera.cullingMask = CachedCullingMask;
|
||||||
eyeCamera.stereoTargetEye = StereoTargetEyeMask.None;
|
eyeCamera.stereoTargetEye = StereoTargetEyeMask.None;
|
||||||
|
eyeCamera.cullingMatrix = _mainCamera.cullingMatrix;
|
||||||
eyeCamera.projectionMatrix = _mainCamera.GetStereoProjectionMatrix(eye);
|
eyeCamera.projectionMatrix = _mainCamera.GetStereoProjectionMatrix(eye);
|
||||||
eyeCamera.worldToCameraMatrix = _mainCamera.GetStereoViewMatrix(eye);
|
eyeCamera.worldToCameraMatrix = _mainCamera.GetStereoViewMatrix(eye);
|
||||||
eyeCamera.Render();
|
eyeCamera.Render();
|
||||||
|
eyeCamera.ResetCullingMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class LegacyContentMitigationMod : MelonMod
|
||||||
ApplyPatches(typeof(Patches.CVRWorld_Patches)); // post processing shit
|
ApplyPatches(typeof(Patches.CVRWorld_Patches)); // post processing shit
|
||||||
ApplyPatches(typeof(Patches.CVRTools_Patches)); // prevent shader replacement when fix is active
|
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.HeadHiderManager_Patches)); // prevent main cam triggering early head hide
|
||||||
|
ApplyPatches(typeof(Patches.CVRMirror_Patches));
|
||||||
|
|
||||||
InitializeIntegration("BTKUILib", Integrations.BtkUiAddon.Initialize); // quick menu options
|
InitializeIntegration("BTKUILib", Integrations.BtkUiAddon.Initialize); // quick menu options
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Core.Player.LocalClone;
|
using ABI_RC.Core.Player.LocalClone;
|
||||||
using ABI_RC.Core.Player.TransformHider;
|
using ABI_RC.Core.Player.TransformHider;
|
||||||
using ABI.CCK.Components;
|
using ABI.CCK.Components;
|
||||||
|
using cohtml;
|
||||||
|
using cohtml.Net;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering.PostProcessing;
|
using UnityEngine.Rendering.PostProcessing;
|
||||||
|
@ -125,4 +127,15 @@ internal static class HeadHiderManager_Patches
|
||||||
transformHiderManager._resetAfterThisRender = flag;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -27,6 +27,6 @@ using System.Reflection;
|
||||||
namespace NAK.LegacyContentMitigation.Properties;
|
namespace NAK.LegacyContentMitigation.Properties;
|
||||||
internal static class AssemblyInfoParams
|
internal static class AssemblyInfoParams
|
||||||
{
|
{
|
||||||
public const string Version = "1.0.1";
|
public const string Version = "1.0.2";
|
||||||
public const string Author = "Exterrata & NotAKidoS";
|
public const string Author = "Exterrata & NotAKidoS";
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue