Compare commits

...

8 Commits

Author SHA1 Message Date
semantic-release-bot a975cf347a chore(release): 5.9.7 [skip ci]
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)

### Bug Fixes

* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
2025-09-01 08:50:42 +00:00
mob-sakai 3207105a06 fix: error message sometimes after importing assets
close #365
2025-08-21 16:37:40 +09:00
mob-sakai 4cca2fb5ab fix: flickering issue when scale Y changes when used ShadowMode with TextMeshPro
close #367
2025-08-21 13:11:57 +09:00
mob-sakai d1adb33884 fix: skip monitoring TMP objects that can ignore Y-axis scaling 2025-08-20 08:48:07 +09:00
mob-sakai b077d97ed7 fix: edges of TransitionFilter.Shiny appear sharp
close #366
2025-08-20 08:38:58 +09:00
semantic-release-bot 6f90044ec8 chore(release): 5.9.6 [skip ci]
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)

### Bug Fixes

* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
2025-07-17 10:23:05 +00:00
mob-sakai 83128ebb09 fix: draw calls increase even when using UIEffectReplica
The `UIEffectReplica` component reuses materials as much as possible without creating new ones.
close #364
2025-07-17 19:17:15 +09:00
mob-sakai 9dffdb0ed8 fix: ColorFilter does not output intended color when vertex color is not white
close #363
2025-07-09 20:03:24 +09:00
8 changed files with 68 additions and 11 deletions
+18
View File
@@ -1,3 +1,21 @@
## [5.9.7](https://github.com/mob-sakai/UIEffect/compare/5.9.6...5.9.7) (2025-09-01)
### Bug Fixes
* edges of `TransitionFilter.Shiny` appear sharp ([b077d97](https://github.com/mob-sakai/UIEffect/commit/b077d97ed706acbbdd3b20e765ec0552fa464f9b)), closes [#366](https://github.com/mob-sakai/UIEffect/issues/366)
* error message sometimes after importing assets ([3207105](https://github.com/mob-sakai/UIEffect/commit/3207105a067801696de789d282c74a93b798ed57)), closes [#365](https://github.com/mob-sakai/UIEffect/issues/365)
* flickering issue when scale Y changes when used `ShadowMode` with TextMeshPro ([4cca2fb](https://github.com/mob-sakai/UIEffect/commit/4cca2fb5ab34ea454ff8df3def5f1730a71a198c)), closes [#367](https://github.com/mob-sakai/UIEffect/issues/367)
* skip monitoring TMP objects that can ignore Y-axis scaling ([d1adb33](https://github.com/mob-sakai/UIEffect/commit/d1adb33884971aa7d6c473fcd08cdf25e58cd261))
## [5.9.6](https://github.com/mob-sakai/UIEffect/compare/5.9.5...5.9.6) (2025-07-17)
### Bug Fixes
* `ColorFilter` does not output intended color when vertex color is not white ([9dffdb0](https://github.com/mob-sakai/UIEffect/commit/9dffdb0ed88750a915fdd5e437b79ab766ce45c2)), closes [#363](https://github.com/mob-sakai/UIEffect/issues/363)
* draw calls increase even when using `UIEffectReplica` ([83128eb](https://github.com/mob-sakai/UIEffect/commit/83128ebb09305e4c15a58968a94550179e96ffac)), closes [#364](https://github.com/mob-sakai/UIEffect/issues/364)
## [5.9.5](https://github.com/mob-sakai/UIEffect/compare/5.9.4...5.9.5) (2025-06-26)
@@ -158,6 +158,8 @@ namespace Coffee.UIEffectInternal
private void OnPlayModeStateChanged(PlayModeStateChange state)
{
if (!this) return;
switch (state)
{
case PlayModeStateChange.ExitingEditMode:
@@ -2,6 +2,7 @@ using System;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using System.Reflection;
namespace Coffee.UIEffectInternal
{
@@ -67,7 +68,15 @@ namespace Coffee.UIEffectInternal
if (s_IsInitializedAfterCanvasRebuild) return;
s_IsInitializedAfterCanvasRebuild = true;
// Explicitly set `Canvas.willRenderCanvases += CanvasUpdateRegistry.PerformUpdate`.
CanvasUpdateRegistry.IsRebuildingLayout();
#if TMP_ENABLE
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
typeof(TMPro.TMP_UpdateManager)
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
.GetValue(null);
#endif
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
Canvas.willRenderCanvases += OnAfterCanvasRebuild;
Logging.LogMulticast(typeof(Canvas), "willRenderCanvases",
message: "InitializeAfterCanvasRebuild");
+25 -6
View File
@@ -99,7 +99,12 @@ namespace Coffee.UIEffects
public override bool canModifyShape => m_AllowToModifyMeshShape;
public override uint effectId => target ? target.effectId : 0;
public override uint effectId => target
? target.effectId
: preset
? (uint)preset.GetInstanceID()
: (uint)GetInstanceID();
public override UIEffectContext context
{
@@ -115,11 +120,25 @@ namespace Coffee.UIEffects
}
}
public override RectTransform transitionRoot => useTargetTransform && isTargetInScene
? target.transitionRoot
: m_CustomRoot
? m_CustomRoot
: transform as RectTransform;
public override RectTransform transitionRoot
{
get
{
if (preset && useTargetTransform && !m_CustomRoot && graphic && graphic.canvas)
{
return graphic.canvas.transform as RectTransform;
}
if (useTargetTransform && isTargetInScene)
{
return target.transitionRoot;
}
return m_CustomRoot
? m_CustomRoot
: transform as RectTransform;
}
}
private bool isTargetInScene => target && target.gameObject.scene.IsValid();
+3 -1
View File
@@ -143,7 +143,9 @@ namespace Coffee.UIEffects
var toRemove = InternalListPool<TextMeshProUGUI>.Rent();
foreach (var textMeshProUGUI in s_RegisteredInstances)
{
if (textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
if (textMeshProUGUI
&& textMeshProUGUI.isActiveAndEnabled
&& !textMeshProUGUI.isTextObjectScaleStatic)
{
var id = textMeshProUGUI.GetHashCode();
var lossyScaleY = textMeshProUGUI.transform.lossyScale.y;
+9 -2
View File
@@ -516,7 +516,7 @@ half4 apply_transition_filter(half4 color, const float alpha, const float2 uvLoc
{
const float factor = alpha - transition_rate() * (1 + _TransitionWidth) + _TransitionWidth;
const float softness = max(0.0001, _TransitionWidth * _TransitionSoftness);
const half bandLerp = saturate((_TransitionWidth - factor) * 1 / softness);
const half bandLerp = saturate((_TransitionWidth - factor) * 2 / softness);
const half softLerp = saturate(factor * 2 / softness);
half4 bandColor = apply_transition_color_filter(half4(color.rgb, 1), half4(_TransitionColor.rgb, 1),
_TransitionColor.a);
@@ -540,7 +540,14 @@ half4 apply_transition_filter(half4 color, const float alpha, const float2 uvLoc
}
#endif
color = lerp(color, bandColor, bandLerp * softLerp);
half lerpFactor = bandLerp * softLerp;
#if TRANSITION_SHINY
{
lerpFactor *= lerpFactor;
}
#endif
color = lerp(color, bandColor, lerpFactor);
#if TRANSITION_DISSOLVE
{
+1 -1
View File
@@ -152,6 +152,7 @@ Shader "Hidden/UI/Default (UIEffect)"
{
v2f IN = _fragInput;
half4 color = (tex2D(_MainTex, uv) + _TextureSampleAdd);
color.rgb *= IN.color.rgb;
color.rgb *= color.a;
return color;
}
@@ -170,7 +171,6 @@ Shader "Hidden/UI/Default (UIEffect)"
_fragInput = IN;
half4 c = uieffect(IN.texcoord, IN.uvMask, IN.worldPosition);
c.rgb *= IN.color.rgb;
c *= IN.color.a;
#ifdef UNITY_UI_CLIP_RECT
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "com.coffee.ui-effect",
"displayName": "UI Effect",
"description": "UIEffect is an open-source package that allows you to intuitively apply rich UI effects directly from the Inspector or via code.\nCombine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!",
"version": "5.9.5",
"version": "5.9.7",
"unity": "2020.3",
"license": "MIT",
"repository": {