Compare commits

...

7 Commits

Author SHA1 Message Date
semantic-release-bot 20e7f2fa61 chore(release): 5.10.6 [skip ci]
## [5.10.6](https://github.com/mob-sakai/UIEffect/compare/5.10.5...5.10.6) (2025-12-18)

### Bug Fixes

* fixed an issue where shader variants were not registered automatically ([6b79864](https://github.com/mob-sakai/UIEffect/commit/6b79864a394d79e6ad13f64af1d521fab1f781a7)), closes [#383](https://github.com/mob-sakai/UIEffect/issues/383)
2025-12-18 09:37:32 +00:00
mob-sakai 1b292febb7 chore: update package for development 2025-12-18 18:09:16 +09:00
mob-sakai 6b79864a39 fix: fixed an issue where shader variants were not registered automatically
close #383
2025-12-18 17:27:32 +09:00
semantic-release-bot 4e30651290 chore(release): 5.10.5 [skip ci]
## [5.10.5](https://github.com/mob-sakai/UIEffect/compare/5.10.4...5.10.5) (2025-11-20)

### Bug Fixes

* graphic disappears when changing filters from code ([8776057](https://github.com/mob-sakai/UIEffect/commit/87760570ec7f4e2ca395cfaa0d2ab5d28c9cf9f3)), closes [#382](https://github.com/mob-sakai/UIEffect/issues/382)
2025-11-20 08:12:42 +00:00
mob-sakai 87760570ec fix: graphic disappears when changing filters from code
close #382
2025-11-20 16:56:23 +09:00
semantic-release-bot ef7ac0aaad chore(release): 5.10.4 [skip ci]
## [5.10.4](https://github.com/mob-sakai/UIEffect/compare/5.10.3...5.10.4) (2025-10-27)

### Bug Fixes

* remove `sealed` from `UIEffect` and `UIEffectReplica` ([2fd87e9](https://github.com/mob-sakai/UIEffect/commit/2fd87e909af65bf88a9c39cd157dfb06a56b3af0)), closes [#379](https://github.com/mob-sakai/UIEffect/issues/379)
2025-10-27 10:51:01 +00:00
mob-sakai 2fd87e909a fix: remove sealed from UIEffect and UIEffectReplica
close #379
2025-10-27 19:15:42 +09:00
7 changed files with 47 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
"com.unity.ide.rider": "3.0.36",
"com.unity.ide.rider": "3.0.38",
"com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.9",
"com.unity.modules.animation": "1.0.0"
+1 -1
View File
@@ -46,7 +46,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.36",
"version": "3.0.38",
"depth": 0,
"source": "registry",
"dependencies": {
+21
View File
@@ -1,3 +1,24 @@
## [5.10.6](https://github.com/mob-sakai/UIEffect/compare/5.10.5...5.10.6) (2025-12-18)
### Bug Fixes
* fixed an issue where shader variants were not registered automatically ([6b79864](https://github.com/mob-sakai/UIEffect/commit/6b79864a394d79e6ad13f64af1d521fab1f781a7)), closes [#383](https://github.com/mob-sakai/UIEffect/issues/383)
## [5.10.5](https://github.com/mob-sakai/UIEffect/compare/5.10.4...5.10.5) (2025-11-20)
### Bug Fixes
* graphic disappears when changing filters from code ([8776057](https://github.com/mob-sakai/UIEffect/commit/87760570ec7f4e2ca395cfaa0d2ab5d28c9cf9f3)), closes [#382](https://github.com/mob-sakai/UIEffect/issues/382)
## [5.10.4](https://github.com/mob-sakai/UIEffect/compare/5.10.3...5.10.4) (2025-10-27)
### Bug Fixes
* remove `sealed` from `UIEffect` and `UIEffectReplica` ([2fd87e9](https://github.com/mob-sakai/UIEffect/commit/2fd87e909af65bf88a9c39cd157dfb06a56b3af0)), closes [#379](https://github.com/mob-sakai/UIEffect/issues/379)
## [5.10.3](https://github.com/mob-sakai/UIEffect/compare/5.10.2...5.10.3) (2025-10-22)
@@ -270,7 +270,7 @@ namespace Coffee.UIEffectInternal
_sb.Length--; // Remove last space.
}
var hash = new Hash128((uint)shader.GetInstanceID(), (uint)_sb.GetHashCode(), 0, 0);
var hash = new Hash128((uint)shader.GetInstanceID(), (uint)GetContentsHash(_sb), 0, 0);
if (_cachedVariants.TryGetValue(hash, out var result))
{
Profiler.EndSample();
@@ -288,6 +288,17 @@ namespace Coffee.UIEffectInternal
Profiler.EndSample();
return (variant, pair);
}
private static int GetContentsHash(StringBuilder sb)
{
var hash = 17;
for (var i = 0; i < sb.Length; i++)
{
hash = unchecked(hash * 31 + sb[i]);
}
return hash;
}
#endif
}
+10 -1
View File
@@ -10,7 +10,7 @@ namespace Coffee.UIEffects
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
[ExecuteAlways]
[DisallowMultipleComponent]
public sealed class UIEffect : UIEffectBase
public class UIEffect : UIEffectBase
{
[SerializeField]
protected ToneFilter m_ToneFilter = ToneFilter.None;
@@ -282,6 +282,7 @@ namespace Coffee.UIEffects
{
if (m_ToneFilter == value) return;
context.m_ToneFilter = m_ToneFilter = value;
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -311,6 +312,7 @@ namespace Coffee.UIEffects
{
if (m_ColorFilter == value) return;
context.m_ColorFilter = m_ColorFilter = value;
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -794,6 +796,7 @@ namespace Coffee.UIEffects
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
context.m_SrcBlendMode = m_SrcBlendMode;
context.m_DstBlendMode = m_DstBlendMode;
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -810,6 +813,7 @@ namespace Coffee.UIEffects
if (m_SrcBlendMode == value) return;
context.m_SrcBlendMode = m_SrcBlendMode = value;
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -826,6 +830,7 @@ namespace Coffee.UIEffects
if (m_DstBlendMode == value) return;
context.m_DstBlendMode = m_DstBlendMode = value;
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -838,6 +843,7 @@ namespace Coffee.UIEffects
if (m_ShadowMode == value) return;
context.m_ShadowMode = m_ShadowMode = value;
SetVerticesDirty();
SetVerticesDirty();
}
}
@@ -1013,6 +1019,7 @@ namespace Coffee.UIEffects
{
if (m_EdgeMode == value) return;
context.m_EdgeMode = m_EdgeMode = value;
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -1182,6 +1189,7 @@ namespace Coffee.UIEffects
{
if (m_GradationMode == value) return;
context.m_GradationMode = m_GradationMode = value;
SetVerticesDirty();
SetMaterialDirty();
}
}
@@ -1321,6 +1329,7 @@ namespace Coffee.UIEffects
{
if (m_DetailFilter == value) return;
context.m_DetailFilter = m_DetailFilter = value;
SetVerticesDirty();
SetMaterialDirty();
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ using UnityEngine;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
public sealed class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
{
[SerializeField] private UIEffect m_Target;
[SerializeField] private UIEffectPreset m_Preset;
+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.10.3",
"version": "5.10.6",
"unity": "2020.3",
"license": "MIT",
"repository": {