Skip to content

Commit 0ef6027

Browse files
committed
fix: fix gradation gradient edge (angle gradient)
1 parent 92f9611 commit 0ef6027

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Packages/src/Runtime/UIEffectContext.cs

+2
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelp
433433

434434
private void ApplyGradation(List<UIVertex> verts, Rect rect, Matrix4x4 m, bool canModifyShape)
435435
{
436+
if (gradationMode == GradationMode.None) return;
437+
436438
var a = gradationColor1;
437439
var b = gradationColor2;
438440
var offset = gradationOffset;

Packages/src/Runtime/Utilities/GradientUtil.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ static void AddSplitTime(List<float> results, float time, float offset, float sc
283283
time -= scale;
284284
}
285285

286-
while (time < 1f)
286+
while (time <= 1f)
287287
{
288-
if (0 < time && !Contains(results, time))
288+
if (0 <= time && !Contains(results, time))
289289
{
290290
results.Add(time);
291291
}

0 commit comments

Comments
 (0)