后处理+FEEL完全改进

This commit is contained in:
SoulliesOfficial
2025-12-22 18:36:29 -05:00
parent c3914da4ac
commit a2052bfe16
1427 changed files with 193092 additions and 374110 deletions

View File

@@ -0,0 +1,112 @@
using UnityEngine;
using MoreMountains.Feedbacks;
using MoreMountains.Tools;
namespace MoreMountains.FeedbacksForThirdParty
{
[AddComponentMenu("")]
[FeedbackHelp("控制 Advanced Chromatic Aberration 效果。Intensity 支持曲线动画Center 和其他高级参数Extras支持在效果期间覆盖。")]
[FeedbackPath("PostProcess/Advanced Chromatic Aberration")]
public class MMF_AdvancedChromaticAberration : MMF_Feedback
{
public static bool FeedbackTypeAuthorized = true;
#if UNITY_EDITOR
public override Color FeedbackColor { get { return MMFeedbacksInspectorColors.PostProcessColor; } }
public override bool EvaluateRequiresSetup() { return (GameObject.FindObjectOfType<MMAdvancedChromaticAberrationShaker>() == null); }
public override string RequiredTargetText { get { return "MMAdvancedChromaticAberrationShaker"; } }
public override string RequiresSetupText { get { return "This feedback requires that a MMAdvancedChromaticAberrationShaker be present in your scene, typically on a Global Volume."; } }
#endif
[MMFInspectorGroup("Intensity Shake", true, 54)]
public float Duration = 0.2f;
public bool RelativeIntensity = false;
public AnimationCurve ShakeIntensity = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0));
public float RemapIntensityZero = 0f;
public float RemapIntensityOne = 0.05f;
[MMFInspectorGroup("Center Settings", true, 55)]
[Tooltip("是否修改扩散中心点")]
public bool ModifyCenter = false;
[MMFCondition("ModifyCenter", true)]
[Tooltip("新的扩散中心点 (0.5, 0.5) 为屏幕中心")]
public Vector2 Center = new Vector2(0.5f, 0.5f);
[MMFInspectorGroup("Extra Settings", true, 56)]
[Tooltip("是否修改高级参数 (Split, Dispersion, Jitter, Mask)")]
public bool ModifyExtra = false;
[MMFCondition("ModifyExtra", true)]
[Tooltip("RGB 分离权重")]
public Vector3 ChannelSplit = new Vector3(1f, 0f, -1f);
[MMFCondition("ModifyExtra", true)]
[Tooltip("色散方向打乱强度")]
public float DispersionStrength = 0f;
[MMFCondition("ModifyExtra", true)]
[Tooltip("UV 抖动强度 (Temporal Instability)")]
public float JitterIntensity = 0f;
[MMFCondition("ModifyExtra", true)]
[Tooltip("中心遮罩半径")]
public float MaskRadius = 0.2f;
[MMFCondition("ModifyExtra", true)]
[Tooltip("遮罩边缘硬度")]
public float MaskHardness = 0.2f;
[MMFInspectorGroup("General", true, 57)]
public bool ResetShakerValuesAfterShake = true;
public bool ResetTargetValuesAfterShake = true;
public override float FeedbackDuration { get { return ApplyTimeMultiplier(Duration); } set { Duration = value; } }
protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedChromaticAberrationShakeEvent.Trigger(
this,
ShakeIntensity,
FeedbackDuration,
RemapIntensityZero,
RemapIntensityOne,
RelativeIntensity,
feedbacksIntensity,
ChannelData,
ResetShakerValuesAfterShake,
ResetTargetValuesAfterShake,
NormalPlayDirection,
ComputedTimescaleMode,
false, // stop
false, // restore
// Center
ModifyCenter,
Center,
// Extras
ModifyExtra,
ChannelSplit,
DispersionStrength,
JitterIntensity,
MaskRadius,
MaskHardness
);
}
protected override void CustomStopFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedChromaticAberrationShakeEvent.Trigger(this, ShakeIntensity, FeedbackDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity, stop: true);
}
protected override void CustomRestoreInitialValues()
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedChromaticAberrationShakeEvent.Trigger(this, ShakeIntensity, FeedbackDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity, restore: true);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 979b72b70fd22c643a59ff6453baa3f3

View File

@@ -0,0 +1,110 @@
using UnityEngine;
using MoreMountains.Feedbacks;
using MoreMountains.Tools;
namespace MoreMountains.FeedbacksForThirdParty
{
[AddComponentMenu("")]
[FeedbackHelp("控制 Advanced Vignette 效果。用于制作受击暗角、环境压抑效果等。")]
[FeedbackPath("PostProcess/Advanced Vignette")]
public class MMF_AdvancedVignette : MMF_Feedback
{
public static bool FeedbackTypeAuthorized = true;
#if UNITY_EDITOR
public override Color FeedbackColor { get { return MMFeedbacksInspectorColors.PostProcessColor; } }
public override bool EvaluateRequiresSetup() { return (GameObject.FindObjectOfType<MMAdvancedVignetteShaker>() == null); }
public override string RequiredTargetText { get { return "MMAdvancedVignetteShaker"; } }
public override string RequiresSetupText { get { return "This feedback requires a MMAdvancedVignetteShaker on your Volume."; } }
#endif
[MMFInspectorGroup("Intensity Shake", true, 54)]
public float Duration = 0.2f;
public bool RelativeIntensity = false;
public AnimationCurve ShakeIntensity = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0));
public float RemapIntensityZero = 0f;
public float RemapIntensityOne = 1f;
[MMFInspectorGroup("Center Settings", true, 55)]
public bool ModifyCenter = false;
[MMFCondition("ModifyCenter", true)]
public Vector2 Center = new Vector2(0.5f, 0.5f);
[MMFInspectorGroup("Color Settings", true, 56)]
public bool ModifyColors = false;
[MMFCondition("ModifyColors", true)]
[Tooltip("边缘最暗处的颜色")]
public Color ColorOuter = Color.black;
[MMFCondition("ModifyColors", true)]
[Tooltip("暗角过渡区的颜色")]
public Color ColorInner = Color.black;
[MMFInspectorGroup("Extra Settings", true, 57)]
public bool ModifyExtra = false;
[MMFCondition("ModifyExtra", true)]
[Tooltip("柔和度 (0.01 - 1)")]
public float Smoothness = 0.5f;
[MMFCondition("ModifyExtra", true)]
[Tooltip("圆度 (0 = 方形, 1 = 圆形)")]
public float Roundness = 1f;
[MMFInspectorGroup("General", true, 58)]
public bool ResetShakerValuesAfterShake = true;
public bool ResetTargetValuesAfterShake = true;
public override float FeedbackDuration { get { return ApplyTimeMultiplier(Duration); } set { Duration = value; } }
protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedVignetteShakeEvent.Trigger(
this,
ShakeIntensity,
FeedbackDuration,
RemapIntensityZero,
RemapIntensityOne,
RelativeIntensity,
feedbacksIntensity,
ChannelData,
ResetShakerValuesAfterShake,
ResetTargetValuesAfterShake,
NormalPlayDirection,
ComputedTimescaleMode,
false, // stop
false, // restore
// Center
ModifyCenter,
Center,
// Colors
ModifyColors,
ColorOuter,
ColorInner,
// Extras
ModifyExtra,
Smoothness,
Roundness
);
}
protected override void CustomStopFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedVignetteShakeEvent.Trigger(this, ShakeIntensity, FeedbackDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity, stop: true);
}
protected override void CustomRestoreInitialValues()
{
if (!Active || !FeedbackTypeAuthorized) return;
MMAdvancedVignetteShakeEvent.Trigger(this, ShakeIntensity, FeedbackDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity, restore: true);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f07981798459b6a488d6269c7263522a

View File

@@ -0,0 +1,100 @@
using UnityEngine;
using MoreMountains.Feedbacks;
namespace MoreMountains.FeedbacksForThirdParty
{
[AddComponentMenu("")]
[FeedbackHelp("This feedback allows you to control the Blur Radius of your custom Radial Blur effect over time, and optionally set the Blur Center.")]
[FeedbackPath("PostProcess/Radial Blur")]
public class MMF_RadialBlur : MMF_Feedback
{
public static bool FeedbackTypeAuthorized = true;
#if UNITY_EDITOR
public override Color FeedbackColor { get { return MMFeedbacksInspectorColors.PostProcessColor; } }
public override bool EvaluateRequiresSetup() { return (GameObject.FindObjectOfType<MMRadialBlurShaker>() == null); }
public override string RequiredTargetText { get { return "MMRadialBlurShaker"; } }
public override string RequiresSetupText { get { return "This feedback requires that a MMRadialBlurShaker be present in your scene, typically on a Global Volume."; } }
#endif
[MMFInspectorGroup("Radial Blur Intensity", true, 45)]
[Tooltip("震动持续时间")]
public float ShakeDuration = 0.2f;
[Tooltip("是否使用相对值")]
public bool RelativeIntensity = false;
[Tooltip("震动曲线")]
public AnimationCurve ShakeIntensity = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0));
[Tooltip("曲线 0 对应的模糊半径")]
public float RemapIntensityZero = 0f;
[Tooltip("曲线 1 对应的模糊半径")]
public float RemapIntensityOne = 0.5f;
// --- 新增部分:中心点控制 ---
[MMFInspectorGroup("Radial Center", true, 46)]
[Tooltip("是否修改模糊中心。如果关闭,将使用当前 Volume 的设置(通常为 0.5, 0.5)。")]
public bool ModifyCenter = true; // 默认开启
[Tooltip("模糊中心的屏幕坐标 (0-1)。(0.5, 0.5) 为屏幕正中心。")]
[MMFCondition("ModifyCenter", true)]
public Vector2 TargetCenter = new Vector2(0.5f, 0.5f);
// ---------------------------
[MMFInspectorGroup("Settings", true, 47)]
[Tooltip("结束后重置 Shaker")]
public bool ResetShakerValuesAfterShake = true;
[Tooltip("结束后重置目标值 (Blur Radius 和 Center)")]
public bool ResetTargetValuesAfterShake = true;
protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMRadialBlurShakeEvent.Trigger(
this,
ShakeIntensity,
ShakeDuration,
RemapIntensityZero,
RemapIntensityOne,
RelativeIntensity,
feedbacksIntensity,
ChannelData,
ResetShakerValuesAfterShake,
ResetTargetValuesAfterShake,
NormalPlayDirection,
ComputedTimescaleMode,
false, // stop
false, // restore
ModifyCenter, // 传递 modifyCenter
TargetCenter // 传递 Vector2 center
);
}
protected override void CustomStopFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMRadialBlurShakeEvent.Trigger(
this, ShakeIntensity, ShakeDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity,
feedbacksIntensity, ChannelData, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake,
NormalPlayDirection, ComputedTimescaleMode, stop: true
);
}
protected override void CustomRestoreInitialValues()
{
if (!Active || !FeedbackTypeAuthorized) return;
MMRadialBlurShakeEvent.Trigger(
this, ShakeIntensity, ShakeDuration, RemapIntensityZero, RemapIntensityOne, RelativeIntensity,
1.0f, ChannelData, ResetShakerValuesAfterShake, ResetTargetValuesAfterShake,
NormalPlayDirection, ComputedTimescaleMode, restore: true
);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6fb5a79c3eeee014d871040588e4abc9

View File

@@ -0,0 +1,83 @@
using UnityEngine;
using MoreMountains.Feedbacks;
using MoreMountains.Tools;
namespace MoreMountains.FeedbacksForThirdParty
{
[AddComponentMenu("")]
[FeedbackHelp("控制 Strobe Flash (黑白闪) 效果。在 Duration 期间会自动开启 Auto Flash结束后关闭。")]
[FeedbackPath("PostProcess/Strobe Flash")]
public class MMF_StrobeFlash : MMF_Feedback
{
public static bool FeedbackTypeAuthorized = true;
#if UNITY_EDITOR
public override Color FeedbackColor { get { return MMFeedbacksInspectorColors.PostProcessColor; } }
public override bool EvaluateRequiresSetup() { return (GameObject.FindObjectOfType<MMStrobeFlashShaker>() == null); }
public override string RequiredTargetText { get { return "MMStrobeFlashShaker"; } }
public override string RequiresSetupText { get { return "This feedback requires a MMStrobeFlashShaker on your Volume."; } }
#endif
[MMFInspectorGroup("Strobe Settings", true, 54)]
[Tooltip("闪烁持续时间")]
public float Duration = 0.5f;
[MMFInspectorGroup("Extra Settings", true, 55)]
[Tooltip("是否修改频率和颜色")]
public bool ModifyExtra = false;
[MMFCondition("ModifyExtra", true)]
[Tooltip("闪烁频率")]
public float Frequency = 15f;
[MMFCondition("ModifyExtra", true)]
[Tooltip("高亮颜色 (通常为白色)")]
public Color ColorHigh = Color.white;
[MMFCondition("ModifyExtra", true)]
[Tooltip("暗部颜色 (通常为黑色)")]
public Color ColorLow = Color.black;
[MMFInspectorGroup("General", true, 56)]
public bool ResetShakerValuesAfterShake = true;
public bool ResetTargetValuesAfterShake = true;
public override float FeedbackDuration { get { return ApplyTimeMultiplier(Duration); } set { Duration = value; } }
protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMStrobeFlashShakeEvent.Trigger(
this,
FeedbackDuration,
feedbacksIntensity,
ChannelData,
ResetShakerValuesAfterShake,
ResetTargetValuesAfterShake,
NormalPlayDirection,
ComputedTimescaleMode,
false, // stop
false, // restore
// Extra Params
ModifyExtra,
Frequency,
ColorHigh,
ColorLow
);
}
protected override void CustomStopFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
{
if (!Active || !FeedbackTypeAuthorized) return;
MMStrobeFlashShakeEvent.Trigger(this, Duration, stop: true);
}
protected override void CustomRestoreInitialValues()
{
if (!Active || !FeedbackTypeAuthorized) return;
MMStrobeFlashShakeEvent.Trigger(this, Duration, restore: true);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: eaa5f33ff82bdc144b4a1b20ee37d88c