mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[BetterShadowClone] Added DontRespectFPR setting
This commit is contained in:
parent
829ad55195
commit
0d82606308
6 changed files with 45 additions and 24 deletions
|
@ -16,6 +16,9 @@ public class MeshTransformHider : ITransformHider, IFPRExclusionTask
|
|||
private readonly MeshRenderer _mainMesh;
|
||||
private bool _enabledState;
|
||||
|
||||
// exclusion
|
||||
private readonly FPRExclusion _exclusion;
|
||||
|
||||
#region ITransformHider Methods
|
||||
|
||||
public bool IsActive { get; set; } = true; // default hide, but FPRExclusion can override
|
||||
|
@ -34,7 +37,8 @@ public class MeshTransformHider : ITransformHider, IFPRExclusionTask
|
|||
return;
|
||||
}
|
||||
|
||||
exclusion.relatedTasks.Add(this);
|
||||
_exclusion = exclusion;
|
||||
_exclusion.relatedTasks.Add(this);
|
||||
|
||||
_mainMesh = renderer;
|
||||
|
||||
|
@ -71,14 +75,15 @@ public class MeshTransformHider : ITransformHider, IFPRExclusionTask
|
|||
_frameInitCounter++;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool PostProcess()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void HideTransform()
|
||||
public bool PostProcess()
|
||||
=> true;
|
||||
|
||||
public void HideTransform(bool forced = false)
|
||||
{
|
||||
if (!forced && !IsActive)
|
||||
return;
|
||||
|
||||
_enabledState = _mainMesh.enabled;
|
||||
_mainMesh.enabled = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue