diff --git a/Packages/src/Runtime/UIEffectContext.cs b/Packages/src/Runtime/UIEffectContext.cs index dc8e46c..82ac251 100644 --- a/Packages/src/Runtime/UIEffectContext.cs +++ b/Packages/src/Runtime/UIEffectContext.cs @@ -433,6 +433,8 @@ public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelp private void ApplyGradation(List verts, Rect rect, Matrix4x4 m, bool canModifyShape) { + if (gradationMode == GradationMode.None) return; + var a = gradationColor1; var b = gradationColor2; var offset = gradationOffset; diff --git a/Packages/src/Runtime/Utilities/GradientUtil.cs b/Packages/src/Runtime/Utilities/GradientUtil.cs index 9fd5038..d068f84 100644 --- a/Packages/src/Runtime/Utilities/GradientUtil.cs +++ b/Packages/src/Runtime/Utilities/GradientUtil.cs @@ -283,9 +283,9 @@ static void AddSplitTime(List 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); }