30 lines
968 B
C#
30 lines
968 B
C#
using SLSFramework.General;
|
|
using Beautify.Universal;
|
|
|
|
namespace Cielonos.MainGame.Effects
|
|
{
|
|
public partial class ChromaticAberrationSubmodule : PostProcessingSubmoduleBase
|
|
{
|
|
public LerpFloat intensity;
|
|
|
|
public ChromaticAberrationSubmodule(PostProcessingManager owner) : base(owner)
|
|
{
|
|
this.intensity = new LerpFloat(0, 0.05f);
|
|
}
|
|
|
|
public override void Update(float factor)
|
|
{
|
|
intensity.Update(factor);
|
|
if (owner.GetVolumeComponent<Beautify.Universal.Beautify>(out var beautify))
|
|
{
|
|
beautify.chromaticAberrationIntensity.value = intensity.currentValue * 0.1f;
|
|
}
|
|
}
|
|
}
|
|
|
|
public partial class ChromaticAberrationSubmodule
|
|
{
|
|
public void ModifyIntensity(float value) => ModifyCurrentValue(intensity, value);
|
|
public void SetIntensity(float value) => SetCurrentValue(intensity, value);
|
|
}
|
|
} |