sigma update

This commit is contained in:
2026-01-16 11:00:58 +09:00
parent 59ed03a825
commit 96123d00a2
51 changed files with 6640 additions and 1382 deletions

View File

@@ -29,6 +29,7 @@ public sealed class SeluneGradientSettings
public Vector4 GradientColor { get; init; } = UIColors.Get("LightlessPurple");
public Vector4? HighlightColor { get; init; }
public float GradientPeakOpacity { get; init; } = 0.07f;
public float GradientPeakPosition { get; init; } = 0.035f;
public float HighlightPeakAlpha { get; init; } = 0.13f;
public float HighlightEdgeAlpha { get; init; } = 0f;
public float HighlightMidpoint { get; init; } = 0.45f;
@@ -378,6 +379,7 @@ internal static class SeluneRenderer
topColorVec,
midColorVec,
bottomColorVec,
settings,
settings.BackgroundMode);
}
@@ -403,19 +405,21 @@ internal static class SeluneRenderer
Vector4 topColorVec,
Vector4 midColorVec,
Vector4 bottomColorVec,
SeluneGradientSettings settings,
SeluneGradientMode mode)
{
var peakPosition = Math.Clamp(settings.GradientPeakPosition, 0.01f, 0.99f);
switch (mode)
{
case SeluneGradientMode.Vertical:
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
break;
case SeluneGradientMode.Horizontal:
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
break;
case SeluneGradientMode.Both:
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
break;
}
}
@@ -428,13 +432,14 @@ internal static class SeluneRenderer
float clampedBottomY,
Vector4 topColorVec,
Vector4 midColorVec,
Vector4 bottomColorVec)
Vector4 bottomColorVec,
float peakPosition)
{
var topColor = ImGui.ColorConvertFloat4ToU32(topColorVec);
var midColor = ImGui.ColorConvertFloat4ToU32(midColorVec);
var bottomColor = ImGui.ColorConvertFloat4ToU32(bottomColorVec);
var midY = clampedTopY + (clampedBottomY - clampedTopY) * 0.035f;
var midY = clampedTopY + (clampedBottomY - clampedTopY) * peakPosition;
drawList.AddRectFilledMultiColor(
new Vector2(gradientLeft, clampedTopY),
new Vector2(gradientRight, midY),
@@ -460,13 +465,14 @@ internal static class SeluneRenderer
float clampedBottomY,
Vector4 leftColorVec,
Vector4 midColorVec,
Vector4 rightColorVec)
Vector4 rightColorVec,
float peakPosition)
{
var leftColor = ImGui.ColorConvertFloat4ToU32(leftColorVec);
var midColor = ImGui.ColorConvertFloat4ToU32(midColorVec);
var rightColor = ImGui.ColorConvertFloat4ToU32(rightColorVec);
var midX = gradientLeft + (gradientRight - gradientLeft) * 0.035f;
var midX = gradientLeft + (gradientRight - gradientLeft) * peakPosition;
drawList.AddRectFilledMultiColor(
new Vector2(gradientLeft, clampedTopY),
new Vector2(midX, clampedBottomY),