同步-后处理调整

This commit is contained in:
SoulliesOfficial
2026-07-09 17:10:17 -04:00
parent d474a8929c
commit 2b01d76bf4
21 changed files with 150 additions and 105 deletions

View File

@@ -4,8 +4,8 @@ namespace Ichni.RhythmGame.Beatmap
{
public class PixelateEffect_BM : EffectBase_BM
{
public float bottomX;
public float bottomY;
[Range(0f, 1f)] public float bottomX;
[Range(0f, 1f)] public float bottomY;
public AnimationCurve intensityCurve;
public PixelateEffect_BM() { }
@@ -13,8 +13,8 @@ namespace Ichni.RhythmGame.Beatmap
public PixelateEffect_BM(float effectTime, float bottomX, float bottomY, AnimationCurve intensityCurve)
{
this.effectTime = effectTime;
this.bottomX = bottomX;
this.bottomY = bottomY;
this.bottomX = Mathf.Clamp01(bottomX);
this.bottomY = Mathf.Clamp01(bottomY);
this.intensityCurve = intensityCurve;
}

View File

@@ -7,8 +7,8 @@ namespace Ichni.RhythmGame
public class PixelateEffect : EffectBase
{
#region [] Effect Parameters
public float bottomX;
public float bottomY;
[Range(0f, 1f)] public float bottomX;
[Range(0f, 1f)] public float bottomY;
public AnimationCurve intensityCurve;
private PixelateVolume _pixelateVolume;
@@ -19,8 +19,8 @@ namespace Ichni.RhythmGame
: base(effectTime) // 激活受控时间分段
{
this.effectTime = effectTime;
this.bottomX = bottomX;
this.bottomY = bottomY;
this.bottomX = Mathf.Clamp01(bottomX);
this.bottomY = Mathf.Clamp01(bottomY);
this.intensityCurve = intensityCurve;
}
@@ -41,8 +41,8 @@ namespace Ichni.RhythmGame
if (_pixelateVolume != null)
{
_pixelateVolume.forceActive.value = true;
_pixelateVolume.strengthX.value = Screen.width;
_pixelateVolume.strengthY.value = Screen.height;
_pixelateVolume.strengthX.value = 1f;
_pixelateVolume.strengthY.value = 1f;
}
}
@@ -50,8 +50,9 @@ namespace Ichni.RhythmGame
{
if (_pixelateVolume != null)
{
float x = Mathf.Lerp(Screen.width, bottomX, intensityCurve.Evaluate(effectProgressPercent));
float y = Mathf.Lerp(Screen.height, bottomY, intensityCurve.Evaluate(effectProgressPercent));
float progress = intensityCurve == null ? effectProgressPercent : intensityCurve.Evaluate(effectProgressPercent);
float x = Mathf.Lerp(1f, Mathf.Clamp01(bottomX), progress);
float y = Mathf.Lerp(1f, Mathf.Clamp01(bottomY), progress);
_pixelateVolume.strengthX.value = x;
_pixelateVolume.strengthY.value = y;
@@ -67,8 +68,8 @@ namespace Ichni.RhythmGame
if (_pixelateVolume != null)
{
_pixelateVolume.forceActive.value = false;
_pixelateVolume.strengthX.value = Screen.width;
_pixelateVolume.strengthY.value = Screen.height;
_pixelateVolume.strengthX.value = 1f;
_pixelateVolume.strengthY.value = 1f;
}
}
#endregion