diff --git a/scripts/database/settings/SettingsProfile.cs b/scripts/database/settings/SettingsProfile.cs index 830594b..4d90762 100644 --- a/scripts/database/settings/SettingsProfile.cs +++ b/scripts/database/settings/SettingsProfile.cs @@ -125,6 +125,12 @@ public partial class SettingsProfile [Order] public SettingsItem NoteOpacity { get; private set; } + /// + /// Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly + /// + [Order] + public SettingsItem NoteOpacityExponent { get; private set; } + /// /// Overrides the skin's note mesh /// @@ -589,6 +595,20 @@ public SettingsProfile() } }; + NoteOpacityExponent = new(1.25) + { + Id = "NoteOpacityExponent", + Title = "Note Opacity Exponent", + Description = "Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly", + Section = SettingsSection.Visual, + Slider = new() + { + Step = 0.05f, + MinValue = 1, + MaxValue = 2 + } + }; + NoteMesh = new("skin") { Id = "NoteMesh", diff --git a/scripts/game/LegacyRenderer.cs b/scripts/game/LegacyRenderer.cs index b832f13..2bd2f23 100644 --- a/scripts/game/LegacyRenderer.cs +++ b/scripts/game/LegacyRenderer.cs @@ -32,6 +32,7 @@ public override void _Process(double delta) bool pushback = LegacyRunner.CurrentAttempt.IsReplay ? LegacyRunner.CurrentAttempt.Replays[0].Pushback : settings.Pushback.Value; float hitWindowDepth = pushback ? (float)Constants.HIT_WINDOW * ar / 1000 : 0; float noteOpacity = (float)settings.NoteOpacity; + float noteOpacityExponent = (float)settings.NoteOpacityExponent; if (noteOpacity > 1) { @@ -74,7 +75,7 @@ public override void _Process(double delta) Color color = SkinManager.Instance.Skin.NoteColors[note.Index % SkinManager.Instance.Skin.NoteColors.Length]; transform.Origin = new Vector3(note.X, note.Y, -depth); - color.A = Math.Clamp(alpha * noteOpacity, 0, 1); + color.A = Math.Clamp((float)Math.Pow(alpha * noteOpacity, noteOpacityExponent), 0, 1); Multimesh.SetInstanceTransform(j, transform); Multimesh.SetInstanceColor(j, color); }