mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ff52e4735 | |||
| a3773e3302 | |||
| 5a9f335bf8 | |||
| 3807e4c69a |
@@ -1,3 +1,17 @@
|
||||
## [5.8.4](https://github.com/mob-sakai/UIEffect/compare/5.8.3...5.8.4) (2025-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* NRE while canvas is disabled ([a3773e3](https://github.com/mob-sakai/UIEffect/commit/a3773e33028c60517fb4e6c534f6280194df8e64)), closes [#342](https://github.com/mob-sakai/UIEffect/issues/342)
|
||||
|
||||
## [5.8.3](https://github.com/mob-sakai/UIEffect/compare/5.8.2...5.8.3) (2025-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* the alpha of the gradation color and gradient was being ignored ([3807e4c](https://github.com/mob-sakai/UIEffect/commit/3807e4c69aefaef04b2245522e7c5085ccc65a36)), closes [#341](https://github.com/mob-sakai/UIEffect/issues/341)
|
||||
|
||||
## [5.8.2](https://github.com/mob-sakai/UIEffect/compare/5.8.1...5.8.2) (2025-04-23)
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Coffee.UIEffects
|
||||
|
||||
protected virtual void OnAfterCanvasRebuild()
|
||||
{
|
||||
if (!_material || !graphic || context == null) return;
|
||||
if (!_material || !graphic || !graphic.canvas || context == null) return;
|
||||
|
||||
context.UpdateViewMatrix(GetCurrentMaterial(), transitionRoot, graphic.canvas.rootCanvas);
|
||||
}
|
||||
|
||||
@@ -592,26 +592,28 @@ half4 apply_gradation_filter(const half4 inColor, const float2 uvGrad)
|
||||
if (mode == 1) // Color.Multiply
|
||||
{
|
||||
color.rgb = color.rgb * factor.rgb;
|
||||
color *= factor.a;
|
||||
}
|
||||
else if (mode == 2) // Color.Additive
|
||||
{
|
||||
color.rgb = color.rgb + factor.rgb * color.a;
|
||||
color.rgb = color.rgb + factor.rgb * color.a * factor.a;
|
||||
}
|
||||
else if (mode == 3) // Color.Subtractive
|
||||
{
|
||||
color.rgb = color.rgb - factor.rgb * color.a;
|
||||
color.rgb = color.rgb - factor.rgb * color.a * factor.a;
|
||||
}
|
||||
else if (mode == 4) // Color.Replace
|
||||
{
|
||||
color.rgb = factor.rgb * color.a;
|
||||
color *= factor.a;
|
||||
}
|
||||
else if (mode == 5) // Color.MultiplyLuminance
|
||||
{
|
||||
color.rgb = (1 + Luminance(color.rgb)) * factor.rgb / 2 * color.a;
|
||||
color.rgb = (1 + Luminance(color.rgb)) * factor.rgb * factor.a / 2 * color.a;
|
||||
}
|
||||
else if (mode == 6) // Color.MultiplyAdditive
|
||||
{
|
||||
color.rgb = color.rgb * (1 + factor.rgb);
|
||||
color.rgb = color.rgb * (1 + factor.rgb * factor.a);
|
||||
}
|
||||
|
||||
if (0 < mode)
|
||||
|
||||
@@ -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.8.2",
|
||||
"version": "5.8.4",
|
||||
"unity": "2020.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user