Skip to content

Commit

Permalink
fix: fix gradation gradient edge (angle gradient)
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Jan 7, 2025
1 parent 92f9611 commit 0ef6027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Packages/src/Runtime/UIEffectContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelp

private void ApplyGradation(List<UIVertex> verts, Rect rect, Matrix4x4 m, bool canModifyShape)
{
if (gradationMode == GradationMode.None) return;

var a = gradationColor1;
var b = gradationColor2;
var offset = gradationOffset;
Expand Down
4 changes: 2 additions & 2 deletions Packages/src/Runtime/Utilities/GradientUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ static void AddSplitTime(List<float> results, float time, float offset, float sc
time -= scale;
}

while (time < 1f)
while (time <= 1f)
{
if (0 < time && !Contains(results, time))
if (0 <= time && !Contains(results, time))
{
results.Add(time);
}
Expand Down

0 comments on commit 0ef6027

Please sign in to comment.