Compare commits

..

26 Commits

Author SHA1 Message Date
semantic-release-bot 31b16329bc chore(release): 5.3.3 [skip ci]
## [5.3.3](https://github.com/mob-sakai/UIEffect/compare/5.3.2...5.3.3) (2025-02-06)

### Bug Fixes

* when modifying TextMeshPro vertices, element disapear ([7529a7c](https://github.com/mob-sakai/UIEffect/commit/7529a7c4cd8db27a6d3312bce0a6ed6b13e40f35)), closes [#305](https://github.com/mob-sakai/UIEffect/issues/305)
2025-02-06 10:47:39 +00:00
mob-sakai 7529a7c4cd fix: when modifying TextMeshPro vertices, element disapear
close #305
2025-02-06 19:30:01 +09:00
semantic-release-bot c51b5f34bb chore(release): 5.3.2 [skip ci]
## [5.3.2](https://github.com/mob-sakai/UIEffect/compare/5.3.1...5.3.2) (2025-02-04)

### Bug Fixes

* some effects are not working correctly for TextMeshProUGUI in Unity 6 ([63de374](https://github.com/mob-sakai/UIEffect/commit/63de3742ecd7fcdcaa8dcca8dc104c7288291211))
2025-02-04 00:20:28 +00:00
mob-sakai 63de3742ec fix: some effects are not working correctly for TextMeshProUGUI in Unity 6 2025-02-04 09:07:14 +09:00
mob-sakai e9b32e14fd docs: update readme 2025-01-27 15:32:16 +09:00
semantic-release-bot f4ea151244 chore(release): 5.3.1 [skip ci]
## [5.3.1](https://github.com/mob-sakai/UIEffect/compare/5.3.0...5.3.1) (2025-01-27)

### Bug Fixes

* shader keywords for UIEfect are not recognized in Unity 6 ([fd39abf](https://github.com/mob-sakai/UIEffect/commit/fd39abf5a71138919f8feee587576ba187075304)), closes [#301](https://github.com/mob-sakai/UIEffect/issues/301)
2025-01-27 05:03:16 +00:00
mob-sakai fd39abf5a7 fix: shader keywords for UIEfect are not recognized in Unity 6
It seems that `shader_feature_local_fragment needs` to be defined in the shader itself rather than in the cginc file to properly recognize the keywords.
close #301
2025-01-27 14:02:42 +09:00
semantic-release-bot 27a04ca294 chore(release): 5.3.0 [skip ci]
# [5.3.0](https://github.com/mob-sakai/UIEffect/compare/5.2.4...5.3.0) (2025-01-26)

### Features

* `SamplingFilter.EdgeAlpha` and `SamplingFilter.EdgeLuminance` now support the `Sampling Width` property for edge width ([33b1177](https://github.com/mob-sakai/UIEffect/commit/33b1177815b935a887c5a8918748cbeafec32b6b))
* add `EdgeMode` feature ([eadb477](https://github.com/mob-sakai/UIEffect/commit/eadb477bcd91f8909bfa7b8976241411363ee12c))
* add `ResetOnEnable` option for `UIEffectTweener` ([e326bb7](https://github.com/mob-sakai/UIEffect/commit/e326bb77537b921df775646142105a490ae54851)), closes [#299](https://github.com/mob-sakai/UIEffect/issues/299)
* add `TransitionAutoSpeed` property ([7a765c3](https://github.com/mob-sakai/UIEffect/commit/7a765c32d87f6dfbdb990d5b3a272dd80696b374))
* add `TransitionFilter.Pattern` feature ([b57e98b](https://github.com/mob-sakai/UIEffect/commit/b57e98b64c61a7c7eb3ca97f3bd7e909956ee469))
2025-01-26 16:44:32 +00:00
mob-sakai 8edf1f1128 docs: update readme 2025-01-27 01:18:59 +09:00
mob-sakai c5dfc3bd35 demo: add demos 2025-01-27 01:15:43 +09:00
mob-sakai 372519d01f chore: update coffee.internal 2025-01-27 01:15:43 +09:00
mob-sakai 6be2ab7a4f refactor editor 2025-01-27 01:15:43 +09:00
mob-sakai e326bb7753 feat: add ResetOnEnable option for UIEffectTweener
#299
2025-01-27 01:15:43 +09:00
mob-sakai 7a765c32d8 feat: add TransitionAutoSpeed property
You can use this property to loop the TransitionRate without tweener or animation.
2025-01-27 01:15:43 +09:00
mob-sakai b57e98b64c feat: add TransitionFilter.Pattern feature 2025-01-27 01:15:43 +09:00
mob-sakai eadb477bcd feat: add EdgeMode feature 2025-01-27 01:15:43 +09:00
mob-sakai 33b1177815 feat: SamplingFilter.EdgeAlpha and SamplingFilter.EdgeLuminance now support the Sampling Width property for edge width 2025-01-27 01:15:43 +09:00
mob-sakai 792db85b79 refactor: move shader_feature keywords to cginc 2025-01-27 01:15:43 +09:00
semantic-release-bot 889c7ff578 chore(release): 5.2.4 [skip ci]
## [5.2.4](https://github.com/mob-sakai/UIEffect/compare/5.2.3...5.2.4) (2025-01-26)

### Bug Fixes

* properties may not update correctly when changed via code or animation ([5994f88](https://github.com/mob-sakai/UIEffect/commit/5994f8875ed2280e5c863c30f9c7900d4dce70ed)), closes [#300](https://github.com/mob-sakai/UIEffect/issues/300)
2025-01-26 16:04:15 +00:00
mob-sakai 5994f8875e fix: properties may not update correctly when changed via code or animation
close #300
2025-01-25 19:30:01 +09:00
semantic-release-bot b2d70af9c3 chore(release): 5.2.3 [skip ci]
## [5.2.3](https://github.com/mob-sakai/UIEffect/compare/5.2.2...5.2.3) (2025-01-23)

### Bug Fixes

* `SamplingFilter.None` now correctly respects the sampling scale setting ([bc1578b](https://github.com/mob-sakai/UIEffect/commit/bc1578b0ca91b830b976bf200d387d0ac6963ae6))
* fix the shadow mode inspector in editor ([da53585](https://github.com/mob-sakai/UIEffect/commit/da535854ccbeeb98b2556423425d39058bd5f479))
* UIEffect may not work correctly when using `FallbackAtlas` with TextMeshProUGUI ([d3779f9](https://github.com/mob-sakai/UIEffect/commit/d3779f9f57d0410fa4526527ebed30885bfbc2dd)), closes [#298](https://github.com/mob-sakai/UIEffect/issues/298)
2025-01-23 10:17:55 +00:00
mob-sakai da535854cc fix: fix the shadow mode inspector in editor 2025-01-23 16:29:10 +09:00
mob-sakai bc1578b0ca fix: SamplingFilter.None now correctly respects the sampling scale setting 2025-01-23 16:29:10 +09:00
mob-sakai d3779f9f57 fix: UIEffect may not work correctly when using FallbackAtlas with TextMeshProUGUI
close #298
2025-01-23 16:13:10 +09:00
semantic-release-bot 213daa85e9 chore(release): 5.2.2 [skip ci]
## [5.2.2](https://github.com/mob-sakai/UIEffect/compare/5.2.1...5.2.2) (2025-01-18)

### Bug Fixes

* in Unity 6, `Shadow Color` has no effect on TextMeshPro ([6e4d4ab](https://github.com/mob-sakai/UIEffect/commit/6e4d4ab03db786e4c28d0f2c57d9e58655c5d029)), closes [#297](https://github.com/mob-sakai/UIEffect/issues/297)
2025-01-18 08:24:10 +00:00
mob-sakai 6e4d4ab03d fix: in Unity 6, Shadow Color has no effect on TextMeshPro
Import `TextMeshPro Support` again.
close #297
2025-01-18 17:00:56 +09:00
77 changed files with 22219 additions and 1289 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7cf8e0d1fc8d94fb9944cf32a03c4cfa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,74 @@
using System;
using System.Linq;
using UnityEngine;
using Coffee.UIEffects;
using UnityEngine.Events;
using UnityEngine.UI;
public class ControlByScript : MonoBehaviour
{
[SerializeField]
private UIEffect m_Effect;
[SerializeField]
private ControlTemplate m_ControlTemplate;
private void Start()
{
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.toneFilter), typeof(ToneFilter),
(int)m_Effect.toneFilter, x => m_Effect.toneFilter = (ToneFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.toneIntensity), m_Effect.toneIntensity, x => m_Effect.toneIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.colorFilter), typeof(ColorFilter),
(int)m_Effect.colorFilter, x => m_Effect.colorFilter = (ColorFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.colorIntensity), m_Effect.colorIntensity, x => m_Effect.colorIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsColorDropDown(nameof(m_Effect.color), m_Effect.color, x => m_Effect.color = x);
m_ControlTemplate.Instantiate()
.InitAsSlider("Hue", m_Effect.color.r, x =>
{
var color = m_Effect.color;
color.r = x;
m_Effect.color = color;
});
m_ControlTemplate.Instantiate()
.InitAsToggle(nameof(m_Effect.colorGlow), m_Effect.colorGlow, x => m_Effect.colorGlow = x);
}
private void AddColor(ColorFilter filter, Action<ColorFilter> filterSetter,
float intensity, Action<float> intensitySetter,
Color color, Action<Color> colorSetter,
bool glow, Action<bool> glowSetter)
{
m_ControlTemplate.Instantiate()
.InitAsDropDown(nameof(m_Effect.colorFilter), typeof(ColorFilter),
(int)m_Effect.colorFilter, x => m_Effect.colorFilter = (ColorFilter)x);
m_ControlTemplate.Instantiate()
.InitAsSlider(nameof(m_Effect.colorIntensity), m_Effect.colorIntensity, x => m_Effect.colorIntensity = x);
m_ControlTemplate.Instantiate()
.InitAsColorDropDown(nameof(m_Effect.color), m_Effect.color, x => m_Effect.color = x);
m_ControlTemplate.Instantiate()
.InitAsSlider("Hue", m_Effect.color.r, x =>
{
var color = m_Effect.color;
color.r = x;
m_Effect.color = color;
});
m_ControlTemplate.Instantiate()
.InitAsToggle(nameof(m_Effect.colorGlow), m_Effect.colorGlow, x => m_Effect.colorGlow = x);
}
}
@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 402a2dd4d098a4d708b9f6e7ce0557cd guid: 3fbf547b561114807adbec486aa2b977
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fda8f6b673bdc4e84b040385ee78bf83
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,110 @@
using System;
using System.Linq;
using UnityEngine;
using Coffee.UIEffects;
using UnityEngine.Events;
using UnityEngine.Serialization;
using UnityEngine.UI;
public class ControlTemplate : MonoBehaviour
{
[SerializeField]
private Text m_Label;
[SerializeField]
private Dropdown m_Dropdown;
[SerializeField]
private Slider m_Slider;
[SerializeField]
private Toggle m_Toggle;
[SerializeField]
private RawImage m_RawImage;
public ControlTemplate Instantiate()
{
var go = Instantiate(gameObject, transform.parent, false);
return go.GetComponent<ControlTemplate>();
}
public void InitAsDropDown(string label, Type enumType, int value, UnityAction<int> onValueChanged)
{
m_Label.text = label;
m_Dropdown.ClearOptions();
m_Dropdown.AddOptions(Enum.GetNames(enumType).ToList());
m_Dropdown.onValueChanged.RemoveAllListeners();
m_Dropdown.onValueChanged.AddListener(onValueChanged);
m_Dropdown.SetValueWithoutNotify(value);
// m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
private static readonly (string name, Color color)[] s_Colors = new (string, Color)[]
{
("-", Color.clear),
("White", Color.white),
("Red", Color.red),
("Green", Color.green),
("Blue", Color.blue),
("Yellow", Color.yellow),
("Cyan", Color.cyan),
("Magenta", Color.magenta),
("Black", Color.black)
};
public void InitAsColorDropDown(string label, Color value, UnityAction<Color> onValueChanged)
{
m_Label.text = label;
m_Dropdown.ClearOptions();
m_Dropdown.AddOptions(s_Colors.Select(x => x.name).ToList());
m_Dropdown.onValueChanged.RemoveAllListeners();
m_Dropdown.onValueChanged.AddListener(x =>
{
m_RawImage.color = s_Colors[x].color;
onValueChanged(s_Colors[x].color);
});
m_RawImage.color = value;
m_Dropdown.SetValueWithoutNotify(0);
// m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(true);
}
public void InitAsSlider(string label, float value, UnityAction<float> onValueChanged)
{
m_Label.text = label;
m_Slider.onValueChanged.RemoveAllListeners();
m_Slider.onValueChanged.AddListener(onValueChanged);
m_Slider.SetValueWithoutNotify(value);
m_Dropdown.gameObject.SetActive(false);
// m_Slider.gameObject.SetActive(false);
m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
public void InitAsToggle(string label, bool value, UnityAction<bool> onValueChanged)
{
m_Label.text = label;
m_Toggle.onValueChanged.RemoveAllListeners();
m_Toggle.onValueChanged.AddListener(onValueChanged);
m_Toggle.SetIsOnWithoutNotify(value);
m_Dropdown.gameObject.SetActive(false);
m_Slider.gameObject.SetActive(false);
// m_Toggle.gameObject.SetActive(false);
m_RawImage.gameObject.SetActive(false);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3aef1549bb83f4e6babaf8bc9648ee1b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bb16138913ad1451aa438c3edd486c67
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 098475820cf634867a339bb9af940722
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 1851730bef7524e58b285a364983e21e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 9617fea85692e4f5fb65fb2ddd4496ce
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+171
View File
@@ -0,0 +1,171 @@
fileFormatVersion: 2
guid: be1fa55f69843fb4aaf4d0ff56004fba
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 16, y: 16, z: 16, w: 16}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,61 @@
using Coffee.UIEffects;
using UnityEngine;
public class PatternAndEdge : MonoBehaviour
{
private UIEffect[] _effects;
// Start is called before the first frame update
private void Start()
{
_effects = GetComponentsInChildren<UIEffect>();
}
public void SetTransitionWidth(float value)
{
foreach (var effect in _effects)
{
effect.transitionWidth = value;
}
}
public void SetTransitionRotation(float value)
{
foreach (var effect in _effects)
{
effect.transitionRotation = value;
}
}
public void SetTransitionAutoSpeed(float value)
{
foreach (var effect in _effects)
{
effect.transitionAutoPlaySpeed = value;
}
}
public void SetEdgeWidth(float value)
{
foreach (var effect in _effects)
{
effect.edgeWidth = value;
}
}
public void SetShinyWidth(float value)
{
foreach (var effect in _effects)
{
effect.edgeShinyWidth = value;
}
}
public void SetShinySpeed(float value)
{
foreach (var effect in _effects)
{
effect.edgeShinyAutoPlaySpeed = value;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e095cc53c91de44459b0fda6a14d0eff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,64 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!687078895 &4343727234628468602
SpriteAtlas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PatternAndEdge
m_EditorData:
serializedVersion: 2
textureSettings:
serializedVersion: 2
anisoLevel: 1
compressionQuality: 50
maxTextureSize: 2048
textureCompression: 0
filterMode: 1
generateMipMaps: 0
readable: 0
crunchedCompression: 0
sRGB: 1
platformSettings:
- serializedVersion: 3
m_BuildTarget: DefaultTexturePlatform
m_MaxTextureSize: 2048
m_ResizeAlgorithm: 0
m_TextureFormat: -1
m_TextureCompression: 1
m_CompressionQuality: 50
m_CrunchedCompression: 0
m_AllowsAlphaSplitting: 0
m_Overridden: 0
m_AndroidETC2FallbackOverride: 0
m_ForceMaximumCompressionQuality_BC6H_BC7: 1
packingSettings:
serializedVersion: 2
padding: 4
blockOffset: 1
allowAlphaSplitting: 0
enableRotation: 1
enableTightPacking: 0
enableAlphaDilation: 0
secondaryTextureSettings: {}
variantMultiplier: 1
packables:
- {fileID: 102900000, guid: bb16138913ad1451aa438c3edd486c67, type: 3}
bindAsDefault: 1
isAtlasV2: 0
cachedData: {fileID: 0}
m_MasterAtlas: {fileID: 0}
m_PackedSprites:
- {fileID: 21300000, guid: 098475820cf634867a339bb9af940722, type: 3}
- {fileID: 21300000, guid: 9617fea85692e4f5fb65fb2ddd4496ce, type: 3}
- {fileID: 21300000, guid: 1851730bef7524e58b285a364983e21e, type: 3}
- {fileID: 21300000, guid: be1fa55f69843fb4aaf4d0ff56004fba, type: 3}
m_PackedSpriteNamesToIndex:
- Badge_Checked
- Badge_Police
- Badge_Level
- FlatCornered_64
m_RenderDataMap: {}
m_Tag: PatternAndEdge
m_IsVariant: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 855c67a9aa5494a5eb7dab6da5100e95
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 263e512bc0ad44038af0c3a4e37b6b33
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+55 -4
View File
@@ -252,6 +252,7 @@ MonoBehaviour:
m_Target: {fileID: 1567169363} m_Target: {fileID: 1567169363}
m_UseTargetTransform: 1 m_UseTargetTransform: 1
m_SamplingScale: 1 m_SamplingScale: 1
m_AllowToModifyMeshShape: 1
--- !u!114 &571623417 --- !u!114 &571623417
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -522,6 +523,7 @@ MonoBehaviour:
m_ColorGlow: 0 m_ColorGlow: 0
m_SamplingFilter: 5 m_SamplingFilter: 5
m_SamplingIntensity: 0.197 m_SamplingIntensity: 0.197
m_SamplingWidth: 1
m_SamplingScale: 1 m_SamplingScale: 1
m_TransitionFilter: 3 m_TransitionFilter: 3
m_TransitionRate: 0.411 m_TransitionRate: 0.411
@@ -533,9 +535,14 @@ MonoBehaviour:
m_TransitionKeepAspectRatio: 1 m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.071 m_TransitionWidth: 0.071
m_TransitionSoftness: 0.401 m_TransitionSoftness: 0.401
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6 m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1} m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
m_TransitionColorGlow: 0 m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0 m_TargetMode: 0
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1} m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
m_TargetRange: 0.118 m_TargetRange: 0.118
@@ -586,7 +593,15 @@ MonoBehaviour:
m_NumAlphaKeys: 2 m_NumAlphaKeys: 2
m_GradationOffset: -0.349 m_GradationOffset: -0.349
m_GradationScale: 0.62374645 m_GradationScale: 0.62374645
m_AllowExtendVertex: 1 m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyWidth: 0.5
m_EdgeShinySpeed: 1
m_PatternArea: 1
--- !u!114 &1120943173 --- !u!114 &1120943173
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -706,9 +721,13 @@ MonoBehaviour:
m_Delay: 0.5 m_Delay: 0.5
m_Duration: 1 m_Duration: 1
m_Interval: 0.5 m_Interval: 0.5
m_PlayOnEnable: 1 m_PlayOnEnable: 3
m_ResetTimeOnEnable: 1
m_WrapMode: 1 m_WrapMode: 1
m_UpdateMode: 0 m_UpdateMode: 0
m_OnComplete:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1242517206 --- !u!114 &1242517206
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -730,6 +749,7 @@ MonoBehaviour:
m_ColorGlow: 0 m_ColorGlow: 0
m_SamplingFilter: 1 m_SamplingFilter: 1
m_SamplingIntensity: 1 m_SamplingIntensity: 1
m_SamplingWidth: 1
m_SamplingScale: 1 m_SamplingScale: 1
m_TransitionFilter: 3 m_TransitionFilter: 3
m_TransitionRate: 0.408 m_TransitionRate: 0.408
@@ -741,9 +761,14 @@ MonoBehaviour:
m_TransitionKeepAspectRatio: 1 m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.074 m_TransitionWidth: 0.074
m_TransitionSoftness: 0.27 m_TransitionSoftness: 0.27
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6 m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1} m_TransitionColor: {r: 0, g: 0.5019608, b: 1.0039216, a: 1}
m_TransitionColorGlow: 1 m_TransitionColorGlow: 1
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 1 m_TargetMode: 1
m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1} m_TargetColor: {r: 0.22352943, g: 0.87843144, b: 0.9450981, a: 1}
m_TargetRange: 0.118 m_TargetRange: 0.118
@@ -794,7 +819,15 @@ MonoBehaviour:
m_NumAlphaKeys: 2 m_NumAlphaKeys: 2
m_GradationOffset: -0.349 m_GradationOffset: -0.349
m_GradationScale: 0.62374645 m_GradationScale: 0.62374645
m_AllowExtendVertex: 1 m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 2
m_EdgeWidth: 0.5
m_EdgeColorFilter: 6
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyWidth: 0.5
m_EdgeShinySpeed: 1
m_PatternArea: 1
--- !u!114 &1242517207 --- !u!114 &1242517207
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -894,6 +927,7 @@ MonoBehaviour:
m_ColorGlow: 0 m_ColorGlow: 0
m_SamplingFilter: 0 m_SamplingFilter: 0
m_SamplingIntensity: 0.5 m_SamplingIntensity: 0.5
m_SamplingWidth: 1
m_SamplingScale: 1 m_SamplingScale: 1
m_TransitionFilter: 0 m_TransitionFilter: 0
m_TransitionRate: 0.5 m_TransitionRate: 0.5
@@ -905,9 +939,14 @@ MonoBehaviour:
m_TransitionKeepAspectRatio: 1 m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.2 m_TransitionWidth: 0.2
m_TransitionSoftness: 0.2 m_TransitionSoftness: 0.2
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6 m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1} m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
m_TransitionColorGlow: 0 m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0 m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1} m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 0.1 m_TargetRange: 0.1
@@ -958,7 +997,15 @@ MonoBehaviour:
m_NumAlphaKeys: 2 m_NumAlphaKeys: 2
m_GradationOffset: 0 m_GradationOffset: 0
m_GradationScale: 1 m_GradationScale: 1
m_AllowExtendVertex: 1 m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyWidth: 0.5
m_EdgeShinySpeed: 1
m_PatternArea: 1
--- !u!114 &1567169364 --- !u!114 &1567169364
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1039,5 +1086,9 @@ MonoBehaviour:
m_Duration: 1 m_Duration: 1
m_Interval: 0.5 m_Interval: 0.5
m_PlayOnEnable: 1 m_PlayOnEnable: 1
m_ResetTimeOnEnable: 1
m_WrapMode: 1 m_WrapMode: 1
m_UpdateMode: 0 m_UpdateMode: 0
m_OnComplete:
m_PersistentCalls:
m_Calls: []
@@ -0,0 +1,110 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CarterOne-Regular SDF - Outline
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ValidKeywords:
- OUTLINE_ON
- UNDERLAY_ON
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Cube:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FaceTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: -5656930091445551790, guid: bc6ef582a0efa420683ff976adff235a,
type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OutlineTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
- _BevelClamp: 0
- _BevelOffset: 0
- _BevelRoundness: 0
- _BevelWidth: 0
- _BumpFace: 0
- _BumpOutline: 0
- _ColorMask: 15
- _CullMode: 0
- _Diffuse: 0.5
- _FaceDilate: 0
- _FaceUVSpeedX: 0
- _FaceUVSpeedY: 0
- _GlowInner: 0.05
- _GlowOffset: 0
- _GlowOuter: 0.05
- _GlowPower: 0.75
- _GradientScale: 10
- _LightAngle: 3.1416
- _MaskSoftnessX: 0
- _MaskSoftnessY: 0
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0.25
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.365625
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
- _Sharpness: 0
- _SpecularPower: 2
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TextureHeight: 1024
- _TextureWidth: 1024
- _UnderlayDilate: 1
- _UnderlayOffsetX: 1
- _UnderlayOffsetY: -1
- _UnderlaySoftness: 0
- _VertexOffsetX: 0
- _VertexOffsetY: 0
- _WeightBold: 0.75
- _WeightNormal: 0
m_Colors:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cab5405a1d5e24ca7858d78bc295cc25
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -15,10 +15,6 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: COLOR_ADDITIVE - keywords: COLOR_ADDITIVE
passType: 0 passType: 0
- keywords: COLOR_ADDITIVE SAMPLING_BLUR_FAST
passType: 0
- keywords: COLOR_ADDITIVE SAMPLING_BLUR_FAST UNITY_UI_CLIP_RECT
passType: 0
- keywords: COLOR_CONTRAST - keywords: COLOR_CONTRAST
passType: 0 passType: 0
- keywords: COLOR_HSV_MODIFIER - keywords: COLOR_HSV_MODIFIER
@@ -29,30 +25,50 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: COLOR_MULTIPLY - keywords: COLOR_MULTIPLY
passType: 0 passType: 0
- keywords: COLOR_MULTIPLY SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE TARGET_HUE - keywords: COLOR_MULTIPLY SHADOW_COLOR_REPLACE
TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
passType: 0 passType: 0
- keywords: COLOR_MULTIPLY_ADDITIVE - keywords: COLOR_MULTIPLY_ADDITIVE
passType: 0 passType: 0
- keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE - keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_BLUR_FAST TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_DISSOLVE TRANSITION_DISSOLVE
passType: 0 passType: 0
- keywords: COLOR_MULTIPLY_ADDITIVE SAMPLING_RGB_SHIFT TONE_GRAYSCALE TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_DISSOLVE
passType: 0
- keywords: COLOR_MULTIPLY_LUMINANCE - keywords: COLOR_MULTIPLY_LUMINANCE
passType: 0 passType: 0
- keywords: COLOR_REPLACE - keywords: COLOR_REPLACE
passType: 0 passType: 0
- keywords: COLOR_REPLACE SAMPLING_BLUR_FAST
passType: 0
- keywords: COLOR_SUBTRACTIVE - keywords: COLOR_SUBTRACTIVE
passType: 0 passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_PLAIN SHADOW_COLOR_MULTIPLY_ADDITIVE
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SAMPLING_EDGE_ALPHA
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY SHADOW_COLOR_MULTIPLY_ADDITIVE
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY
TRANSITION_PATTERN
passType: 0
- keywords: EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_SHINY TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_PATTERN
passType: 0
- keywords: EDGE_PLAIN SHADOW_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
passType: 0
- keywords: EDGE_PLAIN TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
passType: 0
- keywords: SAMPLING_BLUR_DETAIL - keywords: SAMPLING_BLUR_DETAIL
passType: 0 passType: 0
- keywords: SAMPLING_BLUR_FAST - keywords: SAMPLING_BLUR_FAST
passType: 0 passType: 0
- keywords: SAMPLING_BLUR_FAST TONE_GRAYSCALE - keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE
passType: 0
- keywords: SAMPLING_BLUR_FAST SHADOW_COLOR_REPLACE TONE_GRAYSCALE
passType: 0 passType: 0
- keywords: SAMPLING_BLUR_MEDIUM - keywords: SAMPLING_BLUR_MEDIUM
passType: 0 passType: 0
@@ -70,6 +86,8 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: SAMPLING_RGB_SHIFT - keywords: SAMPLING_RGB_SHIFT
passType: 0 passType: 0
- keywords: SHADOW_COLOR_REPLACE
passType: 0
- keywords: TONE_GRAYSCALE - keywords: TONE_GRAYSCALE
passType: 0 passType: 0
- keywords: TONE_NEGATIVE - keywords: TONE_NEGATIVE
@@ -84,6 +102,8 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT - keywords: TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNITY_UI_CLIP_RECT
passType: 0 passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE - keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
passType: 0 passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT - keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE UNITY_UI_CLIP_RECT
@@ -94,6 +114,8 @@ ShaderVariantCollection:
passType: 0 passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNITY_UI_CLIP_RECT - keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNITY_UI_CLIP_RECT
passType: 0 passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN
passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY - keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY
passType: 0 passType: 0
- keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNITY_UI_CLIP_RECT - keywords: TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNITY_UI_CLIP_RECT
@@ -107,17 +129,24 @@ ShaderVariantCollection:
- first: {fileID: 4800000, guid: e65241fa80a374114b3f55ed746c04d9, type: 3} - first: {fileID: 4800000, guid: e65241fa80a374114b3f55ed746c04d9, type: 3}
second: second:
variants: variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF - keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0 passType: 0
- first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3} - first: {fileID: 4800000, guid: 935b7be1c88464d2eb87204fdfab5a38, type: 3}
second: second:
variants: variants:
- keywords: COLOR_ADDITIVE GLOW_ON SAMPLING_BLUR_FAST UNDERLAY_ON
passType: 0
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON - keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
passType: 0 passType: 0
- keywords: EDGE_COLOR_REPLACE EDGE_PLAIN GLOW_ON UNDERLAY_ON
passType: 0
- keywords: EDGE_COLOR_REPLACE EDGE_SHINY GLOW_ON UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON - keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_FAST SHADOW_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON - keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON - keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
@@ -127,61 +156,48 @@ ShaderVariantCollection:
- keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE - keywords: GLOW_ON SHADOW_COLOR_REPLACE TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE
UNDERLAY_ON UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON SHADOW_COLOR_REPLACE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON - keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON - keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE - keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
UNDERLAY_ON UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON - keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_PATTERN UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON - keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON - keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
passType: 0 passType: 0
- keywords: GLOW_ON UNDERLAY_ON
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO - keywords: SAMPLING_PIXELATION TONE_RETRO
passType: 0 passType: 0
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF - keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0 passType: 0
- first: {fileID: 4800000, guid: c67f821adbb6348a3a21573a25b55de0, type: 3}
second:
variants:
- keywords: COLOR_ADDITIVE GLOW_ON SAMPLING_BLUR_FAST UNDERLAY_ON
passType: 0
- keywords: COLOR_HSV_MODIFIER GLOW_ON UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_BLUR_DETAIL UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_EDGE_LUMINANCE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_PIXELATION UNDERLAY_ON
passType: 0
- keywords: GLOW_ON SAMPLING_RGB_SHIFT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TONE_RETRO UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_BURN TRANSITION_COLOR_MULTIPLY_ADDITIVE UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_DISSOLVE
UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_SHINY UNDERLAY_ON
passType: 0
- keywords: GLOW_ON TRANSITION_COLOR_REPLACE TRANSITION_MELT UNDERLAY_ON
passType: 0
- keywords: SAMPLING_PIXELATION TONE_RETRO
passType: 0
- first: {fileID: 4800000, guid: d1cb940e3804b4adcaf9b22083fadfad, type: 3} - first: {fileID: 4800000, guid: d1cb940e3804b4adcaf9b22083fadfad, type: 3}
second: second:
variants: variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF - keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0 passType: 0
- first: {fileID: 4800000, guid: 63a1dba10bff94661a909d63808a9a3b, type: 3} - first: {fileID: 4800000, guid: 63a1dba10bff94661a909d63808a9a3b, type: 3}
second: second:
variants: variants:
- keywords: SAMPLING_RGB_SHIFT TONE_RETRO TRANSITION_COLOR_MULTIPLY_ADDITIVE
TRANSITION_SHINY
passType: 0
- keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF - keywords: SAMPLING_RGB_SHIFT TRANSITION_CUTOFF
passType: 0 passType: 0
--- !u!114 &11400000 --- !u!114 &11400000
@@ -200,6 +216,7 @@ MonoBehaviour:
m_RuntimePresets: m_RuntimePresets:
- {fileID: 1645081683573595507, guid: 3b09ad143990c4c8795c6e93760e132a, type: 3} - {fileID: 1645081683573595507, guid: 3b09ad143990c4c8795c6e93760e132a, type: 3}
- {fileID: 1645081683573595507, guid: 4f70ff0f1e25b4388b9bcb38d619f7bf, type: 3} - {fileID: 1645081683573595507, guid: 4f70ff0f1e25b4388b9bcb38d619f7bf, type: 3}
m_UseHDRColorPicker: 1
m_ShaderVariantCollection: {fileID: -8740588384831342173} m_ShaderVariantCollection: {fileID: -8740588384831342173}
m_ShaderVariantRegistry: m_ShaderVariantRegistry:
m_OptionalShaders: [] m_OptionalShaders: []
+1 -1
View File
@@ -5,7 +5,7 @@
"depth": 0, "depth": 0,
"source": "git", "source": "git",
"dependencies": {}, "dependencies": {},
"hash": "5d0bd14be288153555f975240608e7ee1576b091" "hash": "9f5f59b492aed618d0123ce2f55d041e61c5f246"
}, },
"com.coffee.minimal-resource": { "com.coffee.minimal-resource": {
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource", "version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
+55
View File
@@ -1,3 +1,58 @@
## [5.3.3](https://github.com/mob-sakai/UIEffect/compare/5.3.2...5.3.3) (2025-02-06)
### Bug Fixes
* when modifying TextMeshPro vertices, element disapear ([7529a7c](https://github.com/mob-sakai/UIEffect/commit/7529a7c4cd8db27a6d3312bce0a6ed6b13e40f35)), closes [#305](https://github.com/mob-sakai/UIEffect/issues/305)
## [5.3.2](https://github.com/mob-sakai/UIEffect/compare/5.3.1...5.3.2) (2025-02-04)
### Bug Fixes
* some effects are not working correctly for TextMeshProUGUI in Unity 6 ([63de374](https://github.com/mob-sakai/UIEffect/commit/63de3742ecd7fcdcaa8dcca8dc104c7288291211))
## [5.3.1](https://github.com/mob-sakai/UIEffect/compare/5.3.0...5.3.1) (2025-01-27)
### Bug Fixes
* shader keywords for UIEfect are not recognized in Unity 6 ([fd39abf](https://github.com/mob-sakai/UIEffect/commit/fd39abf5a71138919f8feee587576ba187075304)), closes [#301](https://github.com/mob-sakai/UIEffect/issues/301)
# [5.3.0](https://github.com/mob-sakai/UIEffect/compare/5.2.4...5.3.0) (2025-01-26)
### Features
* `SamplingFilter.EdgeAlpha` and `SamplingFilter.EdgeLuminance` now support the `Sampling Width` property for edge width ([33b1177](https://github.com/mob-sakai/UIEffect/commit/33b1177815b935a887c5a8918748cbeafec32b6b))
* add `EdgeMode` feature ([eadb477](https://github.com/mob-sakai/UIEffect/commit/eadb477bcd91f8909bfa7b8976241411363ee12c))
* add `ResetOnEnable` option for `UIEffectTweener` ([e326bb7](https://github.com/mob-sakai/UIEffect/commit/e326bb77537b921df775646142105a490ae54851)), closes [#299](https://github.com/mob-sakai/UIEffect/issues/299)
* add `TransitionAutoSpeed` property ([7a765c3](https://github.com/mob-sakai/UIEffect/commit/7a765c32d87f6dfbdb990d5b3a272dd80696b374))
* add `TransitionFilter.Pattern` feature ([b57e98b](https://github.com/mob-sakai/UIEffect/commit/b57e98b64c61a7c7eb3ca97f3bd7e909956ee469))
## [5.2.4](https://github.com/mob-sakai/UIEffect/compare/5.2.3...5.2.4) (2025-01-26)
### Bug Fixes
* properties may not update correctly when changed via code or animation ([5994f88](https://github.com/mob-sakai/UIEffect/commit/5994f8875ed2280e5c863c30f9c7900d4dce70ed)), closes [#300](https://github.com/mob-sakai/UIEffect/issues/300)
## [5.2.3](https://github.com/mob-sakai/UIEffect/compare/5.2.2...5.2.3) (2025-01-23)
### Bug Fixes
* `SamplingFilter.None` now correctly respects the sampling scale setting ([bc1578b](https://github.com/mob-sakai/UIEffect/commit/bc1578b0ca91b830b976bf200d387d0ac6963ae6))
* fix the shadow mode inspector in editor ([da53585](https://github.com/mob-sakai/UIEffect/commit/da535854ccbeeb98b2556423425d39058bd5f479))
* UIEffect may not work correctly when using `FallbackAtlas` with TextMeshProUGUI ([d3779f9](https://github.com/mob-sakai/UIEffect/commit/d3779f9f57d0410fa4526527ebed30885bfbc2dd)), closes [#298](https://github.com/mob-sakai/UIEffect/issues/298)
## [5.2.2](https://github.com/mob-sakai/UIEffect/compare/5.2.1...5.2.2) (2025-01-18)
### Bug Fixes
* in Unity 6, `Shadow Color` has no effect on TextMeshPro ([6e4d4ab](https://github.com/mob-sakai/UIEffect/commit/6e4d4ab03db786e4c28d0f2c57d9e58655c5d029)), closes [#297](https://github.com/mob-sakai/UIEffect/issues/297)
## [5.2.1](https://github.com/mob-sakai/UIEffect/compare/5.2.0...5.2.1) (2025-01-14) ## [5.2.1](https://github.com/mob-sakai/UIEffect/compare/5.2.0...5.2.1) (2025-01-14)
+98 -17
View File
@@ -35,6 +35,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _samplingFilter; private SerializedProperty _samplingFilter;
private SerializedProperty _samplingIntensity; private SerializedProperty _samplingIntensity;
private SerializedProperty _samplingWidth;
private SerializedProperty _samplingScale; private SerializedProperty _samplingScale;
private SerializedProperty _transitionFilter; private SerializedProperty _transitionFilter;
@@ -47,9 +48,12 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _transitionKeepAspectRatio; private SerializedProperty _transitionKeepAspectRatio;
private SerializedProperty _transitionWidth; private SerializedProperty _transitionWidth;
private SerializedProperty _transitionSoftness; private SerializedProperty _transitionSoftness;
private SerializedProperty _transitionRange;
private SerializedProperty _transitionColorFilter; private SerializedProperty _transitionColorFilter;
private SerializedProperty _transitionColor; private SerializedProperty _transitionColor;
private SerializedProperty _transitionColorGlow; private SerializedProperty _transitionColorGlow;
private SerializedProperty _transitionPatternReverse;
private SerializedProperty _transitionAutoPlaySpeed;
private SerializedProperty _targetMode; private SerializedProperty _targetMode;
private SerializedProperty _targetColor; private SerializedProperty _targetColor;
@@ -80,6 +84,14 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _gradationScale; private SerializedProperty _gradationScale;
private SerializedProperty _gradationRotation; private SerializedProperty _gradationRotation;
private SerializedProperty _edgeMode;
private SerializedProperty _edgeWidth;
private SerializedProperty _edgeColorFilter;
private SerializedProperty _edgeColor;
private SerializedProperty _edgeShinyWidth;
private SerializedProperty _edgeShinyAutoPlaySpeed;
private SerializedProperty _patternArea;
private bool _expandOthers = true; private bool _expandOthers = true;
private SerializedProperty _allowToModifyMeshShape; private SerializedProperty _allowToModifyMeshShape;
@@ -97,6 +109,7 @@ namespace Coffee.UIEffects.Editors
_samplingFilter = serializedObject.FindProperty("m_SamplingFilter"); _samplingFilter = serializedObject.FindProperty("m_SamplingFilter");
_samplingIntensity = serializedObject.FindProperty("m_SamplingIntensity"); _samplingIntensity = serializedObject.FindProperty("m_SamplingIntensity");
_samplingWidth = serializedObject.FindProperty("m_SamplingWidth");
_samplingScale = serializedObject.FindProperty("m_SamplingScale"); _samplingScale = serializedObject.FindProperty("m_SamplingScale");
_transitionFilter = serializedObject.FindProperty("m_TransitionFilter"); _transitionFilter = serializedObject.FindProperty("m_TransitionFilter");
@@ -109,9 +122,12 @@ namespace Coffee.UIEffects.Editors
_transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio"); _transitionKeepAspectRatio = serializedObject.FindProperty("m_TransitionKeepAspectRatio");
_transitionWidth = serializedObject.FindProperty("m_TransitionWidth"); _transitionWidth = serializedObject.FindProperty("m_TransitionWidth");
_transitionSoftness = serializedObject.FindProperty("m_TransitionSoftness"); _transitionSoftness = serializedObject.FindProperty("m_TransitionSoftness");
_transitionRange = serializedObject.FindProperty("m_TransitionRange");
_transitionColorFilter = serializedObject.FindProperty("m_TransitionColorFilter"); _transitionColorFilter = serializedObject.FindProperty("m_TransitionColorFilter");
_transitionColor = serializedObject.FindProperty("m_TransitionColor"); _transitionColor = serializedObject.FindProperty("m_TransitionColor");
_transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow"); _transitionColorGlow = serializedObject.FindProperty("m_TransitionColorGlow");
_transitionPatternReverse = serializedObject.FindProperty("m_TransitionPatternReverse");
_transitionAutoPlaySpeed = serializedObject.FindProperty("m_TransitionAutoPlaySpeed");
_targetMode = serializedObject.FindProperty("m_TargetMode"); _targetMode = serializedObject.FindProperty("m_TargetMode");
_targetColor = serializedObject.FindProperty("m_TargetColor"); _targetColor = serializedObject.FindProperty("m_TargetColor");
@@ -134,6 +150,14 @@ namespace Coffee.UIEffects.Editors
_shadowColor = serializedObject.FindProperty("m_ShadowColor"); _shadowColor = serializedObject.FindProperty("m_ShadowColor");
_shadowColorGlow = serializedObject.FindProperty("m_ShadowColorGlow"); _shadowColorGlow = serializedObject.FindProperty("m_ShadowColorGlow");
_edgeMode = serializedObject.FindProperty("m_EdgeMode");
_edgeWidth = serializedObject.FindProperty("m_EdgeWidth");
_edgeColorFilter = serializedObject.FindProperty("m_EdgeColorFilter");
_edgeColor = serializedObject.FindProperty("m_EdgeColor");
_edgeShinyWidth = serializedObject.FindProperty("m_EdgeShinyWidth");
_edgeShinyAutoPlaySpeed = serializedObject.FindProperty("m_EdgeShinyAutoPlaySpeed");
_patternArea = serializedObject.FindProperty("m_PatternArea");
_gradationMode = serializedObject.FindProperty("m_GradationMode"); _gradationMode = serializedObject.FindProperty("m_GradationMode");
_gradationColor1 = serializedObject.FindProperty("m_GradationColor1"); _gradationColor1 = serializedObject.FindProperty("m_GradationColor1");
_gradationColor2 = serializedObject.FindProperty("m_GradationColor2"); _gradationColor2 = serializedObject.FindProperty("m_GradationColor2");
@@ -173,7 +197,7 @@ namespace Coffee.UIEffects.Editors
{ {
EditorGUI.indentLevel++; EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_colorIntensity); EditorGUILayout.PropertyField(_colorIntensity);
DrawColor(_colorFilter, _color, prevColorFilter, false); DrawColor(_color, (ColorFilter)_colorFilter.intValue, prevColorFilter, false);
EditorGUILayout.PropertyField(_colorGlow); EditorGUILayout.PropertyField(_colorGlow);
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
} }
@@ -186,6 +210,12 @@ namespace Coffee.UIEffects.Editors
{ {
EditorGUI.indentLevel++; EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_samplingIntensity); EditorGUILayout.PropertyField(_samplingIntensity);
if (_samplingFilter.intValue == (int)SamplingFilter.EdgeAlpha
|| _samplingFilter.intValue == (int)SamplingFilter.EdgeLuminance)
{
EditorGUILayout.PropertyField(_samplingWidth);
}
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
} }
@@ -205,14 +235,25 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse")); EditorGUILayout.PropertyField(_transitionReverse, EditorGUIUtility.TrTempContent("Reverse"));
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
if (2 < _transitionFilter.intValue) if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
{
EditorGUILayout.PropertyField(_transitionWidth, EditorGUIUtility.TrTempContent("Pattern Size"));
EditorGUILayout.PropertyField(_transitionRange, EditorGUIUtility.TrTempContent("Pattern Range"));
EditorGUILayout.PropertyField(_transitionPatternReverse,
EditorGUIUtility.TrTempContent("Pattern Reverse"));
DrawColor(_transitionColorFilter, _transitionColor, null);
}
else if (2 < _transitionFilter.intValue)
{ {
EditorGUILayout.PropertyField(_transitionWidth); EditorGUILayout.PropertyField(_transitionWidth);
EditorGUILayout.PropertyField(_transitionSoftness); EditorGUILayout.PropertyField(_transitionSoftness);
prevColorFilter = (ColorFilter)_transitionColorFilter.intValue; DrawColor(_transitionColorFilter, _transitionColor, _transitionColorGlow);
EditorGUILayout.PropertyField(_transitionColorFilter); }
DrawColor(_transitionColorFilter, _transitionColor, prevColorFilter);
EditorGUILayout.PropertyField(_transitionColorGlow); EditorGUILayout.PropertyField(_transitionAutoPlaySpeed);
if (0 < _transitionFilter.intValue && !Mathf.Approximately(0, _transitionAutoPlaySpeed.floatValue))
{
EditorApplication.QueuePlayerLoopUpdate();
} }
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
@@ -256,6 +297,7 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.Slider(_shadowDistanceX, 0, 1, "Reflection"); EditorGUILayout.Slider(_shadowDistanceX, 0, 1, "Reflection");
EditorGUILayout.PropertyField(_shadowDistanceY, EditorGUIUtility.TrTempContent("Offset")); EditorGUILayout.PropertyField(_shadowDistanceY, EditorGUIUtility.TrTempContent("Offset"));
EditorGUILayout.PropertyField(_shadowMirrorScale); EditorGUILayout.PropertyField(_shadowMirrorScale);
EditorGUILayout.PropertyField(_shadowFade);
} }
else else
{ {
@@ -267,13 +309,11 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.PropertyField(_shadowDistance); EditorGUILayout.PropertyField(_shadowDistance);
EditorGUILayout.PropertyField(_shadowIteration); EditorGUILayout.PropertyField(_shadowIteration);
DrawColor(_shadowColorFilter, _shadowColor, _shadowColorGlow, false);
EditorGUILayout.PropertyField(_shadowFade);
} }
EditorGUILayout.PropertyField(_shadowColorFilter); // Shadow blur intensity
DrawColorPickerField(_shadowColor, false);
EditorGUILayout.PropertyField(_shadowColorGlow);
EditorGUILayout.PropertyField(_shadowFade);
switch ((SamplingFilter)_samplingFilter.intValue) switch ((SamplingFilter)_samplingFilter.intValue)
{ {
case SamplingFilter.BlurFast: case SamplingFilter.BlurFast:
@@ -329,6 +369,30 @@ namespace Coffee.UIEffects.Editors
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
} }
// Edge Mode
DrawSeparator();
if (DrawHeaderPopup(_edgeMode))
{
EditorGUILayout.PropertyField(_edgeWidth);
DrawColor(_edgeColorFilter, _edgeColor, null);
if ((EdgeMode)_edgeMode.intValue == EdgeMode.Shiny)
{
EditorGUILayout.PropertyField(_edgeShinyWidth);
EditorGUILayout.PropertyField(_edgeShinyAutoPlaySpeed);
if (!Mathf.Approximately(0, _edgeShinyAutoPlaySpeed.floatValue))
{
EditorApplication.QueuePlayerLoopUpdate();
}
}
if (_transitionFilter.intValue == (int)TransitionFilter.Pattern)
{
EditorGUILayout.PropertyField(_patternArea);
}
}
DrawSeparator(); DrawSeparator();
_expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others"); _expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others");
if (_expandOthers) if (_expandOthers)
@@ -378,13 +442,12 @@ namespace Coffee.UIEffects.Editors
} }
} }
private static void DrawColor(SerializedProperty filter, SerializedProperty color, ColorFilter prevFilter, private static void DrawColor(SerializedProperty color, ColorFilter filter, ColorFilter prevFilter,
bool showAlpha = true) bool showAlpha = true)
{ {
if (filter.intValue == (int)ColorFilter.None) if (filter == ColorFilter.None) return;
{
} if (filter == ColorFilter.HsvModifier)
else if (filter.intValue == (int)ColorFilter.HsvModifier)
{ {
if (prevFilter != ColorFilter.HsvModifier) if (prevFilter != ColorFilter.HsvModifier)
{ {
@@ -396,7 +459,7 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.Slider(color.FindPropertyRelative("b"), -1f, 1f, "Value"); EditorGUILayout.Slider(color.FindPropertyRelative("b"), -1f, 1f, "Value");
EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha"); EditorGUILayout.Slider(color.FindPropertyRelative("a"), 0, 1, "Alpha");
} }
else if (filter.intValue == (int)ColorFilter.Contrast) else if (filter == ColorFilter.Contrast)
{ {
if (prevFilter != ColorFilter.Contrast) if (prevFilter != ColorFilter.Contrast)
{ {
@@ -418,6 +481,24 @@ namespace Coffee.UIEffects.Editors
} }
} }
private static void DrawColor(SerializedProperty filter, SerializedProperty color, SerializedProperty glow,
bool showAlpha = true)
{
var prevFilter = (ColorFilter)filter.intValue;
EditorGUILayout.PropertyField(filter);
if (filter.intValue == (int)ColorFilter.None) return;
EditorGUI.indentLevel++;
DrawColor(color, (ColorFilter)filter.intValue, prevFilter, showAlpha);
if (glow != null)
{
EditorGUILayout.PropertyField(glow);
}
EditorGUI.indentLevel--;
}
private static bool DrawHeaderPopup(SerializedProperty sp) private static bool DrawHeaderPopup(SerializedProperty sp)
{ {
var r = EditorGUILayout.GetControlRect(); var r = EditorGUILayout.GetControlRect();
@@ -16,6 +16,7 @@ namespace Coffee.UIEffects.Editors
private SerializedProperty _duration; private SerializedProperty _duration;
private SerializedProperty _interval; private SerializedProperty _interval;
private SerializedProperty _playOnEnable; private SerializedProperty _playOnEnable;
private SerializedProperty _resetTimeOnEnable;
private SerializedProperty _updateMode; private SerializedProperty _updateMode;
private SerializedProperty _wrapMode; private SerializedProperty _wrapMode;
private SerializedProperty _onComplete; private SerializedProperty _onComplete;
@@ -28,6 +29,7 @@ namespace Coffee.UIEffects.Editors
_direction = serializedObject.FindProperty("m_Direction"); _direction = serializedObject.FindProperty("m_Direction");
_curve = serializedObject.FindProperty("m_Curve"); _curve = serializedObject.FindProperty("m_Curve");
_playOnEnable = serializedObject.FindProperty("m_PlayOnEnable"); _playOnEnable = serializedObject.FindProperty("m_PlayOnEnable");
_resetTimeOnEnable = serializedObject.FindProperty("m_ResetTimeOnEnable");
_delay = serializedObject.FindProperty("m_Delay"); _delay = serializedObject.FindProperty("m_Delay");
_duration = serializedObject.FindProperty("m_Duration"); _duration = serializedObject.FindProperty("m_Duration");
_interval = serializedObject.FindProperty("m_Interval"); _interval = serializedObject.FindProperty("m_Interval");
@@ -54,6 +56,7 @@ namespace Coffee.UIEffects.Editors
EditorGUILayout.PropertyField(_duration); EditorGUILayout.PropertyField(_duration);
EditorGUILayout.PropertyField(_interval); EditorGUILayout.PropertyField(_interval);
EditorGUILayout.PropertyField(_playOnEnable); EditorGUILayout.PropertyField(_playOnEnable);
EditorGUILayout.PropertyField(_resetTimeOnEnable);
EditorGUILayout.PropertyField(_wrapMode); EditorGUILayout.PropertyField(_wrapMode);
EditorGUILayout.PropertyField(_updateMode); EditorGUILayout.PropertyField(_updateMode);
EditorGUILayout.PropertyField(_onComplete); EditorGUILayout.PropertyField(_onComplete);
+25 -9
View File
@@ -73,8 +73,9 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
## 🎮 Demo ## 🎮 Demo
![](https://github.com/user-attachments/assets/c52f6f40-5fae-484f-b69e-516da706ae54) ![](https://github.com/user-attachments/assets/37a46a7e-1f15-4a52-a928-09a2ed857a47)
![](https://github.com/user-attachments/assets/02ab1686-03d4-4500-bd89-004b2c401441) ![](https://github.com/user-attachments/assets/f1fa2485-e635-4923-a53f-6825d7f85873)
![](https://github.com/user-attachments/assets/1ed410bf-b782-433b-9429-721278c5ba1e)
[WebGL Demo](https://mob-sakai.github.io/UIEffect/) [WebGL Demo](https://mob-sakai.github.io/UIEffect/)
@@ -94,7 +95,7 @@ _This package requires **Unity 2020.3 or later**._
``` ```
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`: - To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
``` ```
openupm add com.coffee.ui-effect@5.0.0 openupm add com.coffee.ui-effect@5.3.0
``` ```
### Install via UPM (with Package Manager UI) ### Install via UPM (with Package Manager UI)
@@ -103,7 +104,7 @@ _This package requires **Unity 2020.3 or later**._
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src` - Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
![](https://github.com/user-attachments/assets/f88f47ad-c606-44bd-9e86-ee3f72eac548) ![](https://github.com/user-attachments/assets/f88f47ad-c606-44bd-9e86-ee3f72eac548)
- To update the package, change suffix `#{version}` to the target version. - To update the package, change suffix `#{version}` to the target version.
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.0` - e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.3.0`
### Install via UPM (Manually) ### Install via UPM (Manually)
@@ -118,7 +119,7 @@ _This package requires **Unity 2020.3 or later**._
``` ```
- To update the package, change suffix `#{version}` to the target version. - To update the package, change suffix `#{version}` to the target version.
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.0",` - e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.3.0",`
### Install as Embedded Package ### Install as Embedded Package
@@ -183,7 +184,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
### Component: UIEffect ### Component: UIEffect
![](https://github.com/user-attachments/assets/e0ba2661-4d3b-4f55-984a-153ec3d53137) ![](https://github.com/user-attachments/assets/a1642385-ebdc-4a66-b167-10c8b15277e1)
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters. The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
@@ -202,16 +203,21 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha` - **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect). - **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
- **Sampling Width**: The width of the sampling effect.
#### Transition Filter #### Transition Filter
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn` - **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect). - **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
- **Transition Tex**: The texture used for the transition filter.- **Transition Width**: The width where the transition color is applied. - **Transition Tex**: The texture used for the transition filter.- **Transition Width**: The width where the transition color is applied.
- **Transition Width**: The width where the transition color is applied.
- **Transition Pattern Range**: The range of the pattern.
- **Transition Pattern Reverse**: Reverse the pattern.
- **Transition Softness**: The softness of the boundary for the transition color. - **Transition Softness**: The softness of the boundary for the transition color.
- **Transition Color Filter**: Specifies the transition color. - **Transition Color Filter**: Specifies the transition color.
- **Transition Color**: The color of the transition. - **Transition Color**: The color of the transition.
- **Transition Color Glow**: Set the transition color to glow. - **Transition Color Glow**: Set the transition color to glow.
- **Transition Auto Play Speed**: The speed of the transition animation. You can use this property to loop the `TransitionRate` without tweener or animation.
#### Target Mode #### Target Mode
@@ -241,7 +247,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
#### Gradation Mode #### Gradation Mode
- **Gradation Mode**: `None`, `Horizontal Gradient`, `Horizontal`, `Vertical Gradient`, `Vertical`, `Radial Fast`, `Radial Detail`, `Diagonal To Right Bottom`, `Diagonal To Right Top`, `Diagonal To Left Bottom`, `Angle`, `Angle Gradient` - **Gradation Mode**: `None`, `Plain`, `Shiny`
- **Gradation Gradient**: The gradient of the gradation. - **Gradation Gradient**: The gradient of the gradation.
- **Gradation Color 1**: The first color of the gradation. - **Gradation Color 1**: The first color of the gradation.
- **Gradation Color 2**: The second color of the gradation. - **Gradation Color 2**: The second color of the gradation.
@@ -256,6 +262,15 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
> It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape. > It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape.
> `Gradation Gradient` has two modes, `Blend` and `Fixed`. > `Gradation Gradient` has two modes, `Blend` and `Fixed`.
#### Edge Mode
- **Edge Mode**: `None`, `Plain`, `Shiny`
- **Edge Width**: The width of the edge.
- **Edge Color Filter**: Specifies the edge color.
- **Edge Color**: The color of the edge.
- **Edge Shiny Width**: The width of the edge shiny.
- **Edge Shiny Auto Play Speed**: The speed of the edge shiny.
#### Others #### Others
- **Sampling Scale**: The referencing scale during sampling. - **Sampling Scale**: The referencing scale during sampling.
@@ -266,7 +281,7 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
### Component: UIEffectTweener ### Component: UIEffectTweener
![](https://github.com/user-attachments/assets/118df4dc-3c08-4e2b-b6c8-97f15c9e5c9f) ![](https://github.com/user-attachments/assets/1c731104-4baf-43f8-ba16-611ee9870df2)
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`. The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
@@ -279,6 +294,7 @@ The `UIEffectTweener` component animates the effect, enabling easy control over
- **Play On Enable**: `None`, `Forward`, `Reverse`, `Keep Direction` - **Play On Enable**: `None`, `Forward`, `Reverse`, `Keep Direction`
- Play the animation automatically when the component is enabled. - Play the animation automatically when the component is enabled.
- If `None` is selected, the animation will not play automatically. You can play it using the `Play`, `PlayForward` or `PlayReverse` method. - If `None` is selected, the animation will not play automatically. You can play it using the `Play`, `PlayForward` or `PlayReverse` method.
- **Reset Time On Enable**: Reset the tweening time when the component is enabled.
- **Wrap Mode**: `Once`, `Loop`, `PingPongOnce`, `PingPongLoop` - **Wrap Mode**: `Once`, `Loop`, `PingPongOnce`, `PingPongLoop`
- **Update Mode**: `Normal`, `UnscaledTime`, `Manual` - **Update Mode**: `Normal`, `UnscaledTime`, `Manual`
- **On Complete**: A event that is triggered when the animation is completed. - **On Complete**: A event that is triggered when the animation is completed.
+16 -1
View File
@@ -46,7 +46,8 @@ namespace Coffee.UIEffects
Shiny = 4, Shiny = 4,
Mask = 5, Mask = 5,
Melt = 6, Melt = 6,
Burn = 7 Burn = 7,
Pattern = 8
} }
public enum BlendType public enum BlendType
@@ -76,6 +77,20 @@ namespace Coffee.UIEffects
Mirror Mirror
} }
public enum EdgeMode
{
None = 0,
Plain,
Shiny
}
public enum PatternArea
{
All = 0,
Inner = 1,
Edge = 2
}
public enum GradationMode public enum GradationMode
{ {
None = 0, None = 0,
@@ -0,0 +1,144 @@
using System;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIEffectInternal
{
[Serializable]
public struct MinMax01
{
[SerializeField]
private float m_Min;
[SerializeField]
private float m_Max;
public MinMax01(float min, float max)
{
m_Min = Mathf.Clamp01(Mathf.Min(min, max));
m_Max = Mathf.Clamp01(Mathf.Max(min, max));
}
public float min
{
get => m_Min;
set
{
m_Min = Mathf.Clamp01(value);
m_Max = Mathf.Max(value, m_Max);
}
}
public float max
{
get => m_Max;
set
{
m_Max = Mathf.Clamp01(value);
m_Min = Mathf.Min(value, m_Min);
}
}
public float average => (m_Max + m_Min) * 0.5f;
public bool Approximately(MinMax01 other)
{
return Mathf.Approximately(m_Min, other.m_Min) && Mathf.Approximately(m_Max, other.m_Max);
}
}
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(MinMax01))]
public class MinMaxRangeDrawer : PropertyDrawer
{
private const float k_NumWidth = 50;
private const float k_Space = 5;
private SerializedProperty _max;
private SerializedProperty _min;
private static bool IsSingleLine(GUIContent label)
{
return EditorGUIUtility.wideMode || label == null || string.IsNullOrEmpty(label.text);
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return IsSingleLine(label) ? 18 : 36;
}
public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
{
EditorGUI.BeginProperty(position, label, prop);
if (_min == null)
{
prop.Next(true);
_min = prop.Copy();
prop.Next(true);
_max = prop.Copy();
}
if (IsSingleLine(label))
{
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
}
else
{
EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
var indent = (EditorGUI.indentLevel + 1) * 15f;
position = new Rect(position.x + indent, position.y + 18, position.width - indent, 16);
}
var min = _min.floatValue;
var max = _max.floatValue;
if (Draw(position, ref min, ref max))
{
_min.floatValue = min;
_max.floatValue = max;
}
EditorGUI.EndProperty();
}
public static bool Draw(Rect position, ref float minValue, ref float maxValue)
{
var indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUI.BeginChangeCheck();
var rect = new Rect(position.x, position.y, k_NumWidth, position.height);
minValue = Mathf.Clamp(EditorGUI.FloatField(rect, minValue), 0, maxValue);
rect.x += rect.width + k_Space;
rect.width = position.width - k_NumWidth * 2 - k_Space * 2;
EditorGUI.MinMaxSlider(rect, ref minValue, ref maxValue, 0, 1);
rect.x += rect.width + k_Space;
rect.width = k_NumWidth;
maxValue = Mathf.Clamp(EditorGUI.FloatField(rect, maxValue), minValue, 1);
EditorGUI.indentLevel = indentLevel;
return EditorGUI.EndChangeCheck();
}
public static bool DrawLayout(GUIContent label, ref float minValue, ref float maxValue)
{
Rect position;
if (IsSingleLine(label))
{
position = EditorGUILayout.GetControlRect(true, 18f);
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
}
else
{
position = EditorGUILayout.GetControlRect(true, 36f);
EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
var indent = (EditorGUI.indentLevel + 1) * 15f;
position = new Rect(position.x + indent, position.y + 18, position.width - indent, 16);
}
return Draw(position, ref minValue, ref maxValue);
}
}
#endif
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dacf9fb8cdb9a4a62a74b629d84cabd3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+235 -38
View File
@@ -39,6 +39,10 @@ namespace Coffee.UIEffects
[SerializeField] [SerializeField]
protected float m_SamplingIntensity = 0.5f; protected float m_SamplingIntensity = 0.5f;
[Range(0.5f, 10f)]
[SerializeField]
protected float m_SamplingWidth = 1;
[PowerRange(0.01f, 100f, 10f)] [PowerRange(0.01f, 100f, 10f)]
[SerializeField] [SerializeField]
protected float m_SamplingScale = 1f; protected float m_SamplingScale = 1f;
@@ -77,6 +81,9 @@ namespace Coffee.UIEffects
[SerializeField] [SerializeField]
protected float m_TransitionSoftness = 0.2f; protected float m_TransitionSoftness = 0.2f;
[SerializeField]
protected MinMax01 m_TransitionRange = new MinMax01(0, 1);
[SerializeField] [SerializeField]
protected ColorFilter m_TransitionColorFilter = ColorFilter.MultiplyAdditive; protected ColorFilter m_TransitionColorFilter = ColorFilter.MultiplyAdditive;
@@ -86,6 +93,13 @@ namespace Coffee.UIEffects
[SerializeField] [SerializeField]
protected bool m_TransitionColorGlow = false; protected bool m_TransitionColorGlow = false;
[SerializeField]
protected bool m_TransitionPatternReverse = false;
[Range(-5, 5)]
[SerializeField]
protected float m_TransitionAutoPlaySpeed = 0f;
[SerializeField] [SerializeField]
protected TargetMode m_TargetMode = TargetMode.None; protected TargetMode m_TargetMode = TargetMode.None;
@@ -167,6 +181,30 @@ namespace Coffee.UIEffects
[SerializeField] [SerializeField]
protected bool m_AllowToModifyMeshShape = true; protected bool m_AllowToModifyMeshShape = true;
[SerializeField]
protected EdgeMode m_EdgeMode = EdgeMode.None;
[Range(0, 1)]
[SerializeField]
protected float m_EdgeWidth = 0.5f;
[SerializeField]
protected ColorFilter m_EdgeColorFilter = ColorFilter.Replace;
[SerializeField]
protected Color m_EdgeColor = Color.white;
[Range(0, 1)]
[SerializeField]
protected float m_EdgeShinyWidth = 0.5f;
[Range(-5, 5)]
[SerializeField]
protected float m_EdgeShinyAutoPlaySpeed = 1f;
[SerializeField]
protected PatternArea m_PatternArea = PatternArea.Inner;
/// <summary> /// <summary>
/// Tone filter for rendering. /// Tone filter for rendering.
/// </summary> /// </summary>
@@ -177,7 +215,7 @@ namespace Coffee.UIEffects
{ {
if (m_ToneFilter == value) return; if (m_ToneFilter == value) return;
context.toneFilter = m_ToneFilter = value; context.toneFilter = m_ToneFilter = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -192,7 +230,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_ToneIntensity, value)) return; if (Mathf.Approximately(m_ToneIntensity, value)) return;
context.toneIntensity = m_ToneIntensity = value; context.toneIntensity = m_ToneIntensity = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -206,7 +244,7 @@ namespace Coffee.UIEffects
{ {
if (m_ColorFilter == value) return; if (m_ColorFilter == value) return;
context.colorFilter = m_ColorFilter = value; context.colorFilter = m_ColorFilter = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -221,7 +259,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_ColorIntensity, value)) return; if (Mathf.Approximately(m_ColorIntensity, value)) return;
context.colorIntensity = m_ColorIntensity = value; context.colorIntensity = m_ColorIntensity = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -233,7 +271,7 @@ namespace Coffee.UIEffects
m_Color.a = 1; m_Color.a = 1;
if (m_Color == value) return; if (m_Color == value) return;
context.color = m_Color = value; context.color = m_Color = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -244,7 +282,7 @@ namespace Coffee.UIEffects
{ {
if (m_ColorGlow == value) return; if (m_ColorGlow == value) return;
context.colorGlow = m_ColorGlow = value; context.colorGlow = m_ColorGlow = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -259,7 +297,7 @@ namespace Coffee.UIEffects
if (m_SamplingFilter == value) return; if (m_SamplingFilter == value) return;
context.samplingFilter = m_SamplingFilter = value; context.samplingFilter = m_SamplingFilter = value;
SetVerticesDirty(); SetVerticesDirty();
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -274,7 +312,19 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_SamplingIntensity, value)) return; if (Mathf.Approximately(m_SamplingIntensity, value)) return;
context.samplingIntensity = m_SamplingIntensity = value; context.samplingIntensity = m_SamplingIntensity = value;
ApplyContextToMaterial(); SetMaterialDirty();
}
}
public float samplingWidth
{
get => m_SamplingWidth;
set
{
value = Mathf.Clamp(value, 0.5f, 10);
if (Mathf.Approximately(m_SamplingWidth, value)) return;
context.samplingWidth = m_SamplingWidth = value;
SetMaterialDirty();
} }
} }
@@ -286,13 +336,11 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0.01f, 100); value = Mathf.Clamp(value, 0.01f, 100);
if (Mathf.Approximately(m_SamplingScale, value)) return; if (Mathf.Approximately(m_SamplingScale, value)) return;
m_SamplingScale = value; m_SamplingScale = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
public override float actualSamplingScale => samplingFilter != SamplingFilter.None public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
? Mathf.Clamp(m_SamplingScale, 0.01f, 100)
: 1;
public override bool canModifyShape => m_AllowToModifyMeshShape; public override bool canModifyShape => m_AllowToModifyMeshShape;
@@ -307,7 +355,7 @@ namespace Coffee.UIEffects
if (m_TransitionFilter == value) return; if (m_TransitionFilter == value) return;
context.transitionFilter = m_TransitionFilter = value; context.transitionFilter = m_TransitionFilter = value;
SetVerticesDirty(); SetVerticesDirty();
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -322,7 +370,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_TransitionRate, value)) return; if (Mathf.Approximately(m_TransitionRate, value)) return;
context.transitionRate = m_TransitionRate = value; context.transitionRate = m_TransitionRate = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -333,7 +381,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionReverse == value) return; if (m_TransitionReverse == value) return;
context.transitionReverse = m_TransitionReverse = value; context.transitionReverse = m_TransitionReverse = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -344,7 +392,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionTex == value) return; if (m_TransitionTex == value) return;
context.transitionTex = m_TransitionTex = value; context.transitionTex = m_TransitionTex = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -355,7 +403,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionTexScale == value) return; if (m_TransitionTexScale == value) return;
context.transitionTexScale = m_TransitionTexScale = value; context.transitionTexScale = m_TransitionTexScale = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -366,7 +414,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionTexOffset == value) return; if (m_TransitionTexOffset == value) return;
context.transitionTexOffset = m_TransitionTexOffset = value; context.transitionTexOffset = m_TransitionTexOffset = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -400,7 +448,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_TransitionWidth, value)) return; if (Mathf.Approximately(m_TransitionWidth, value)) return;
context.transitionWidth = m_TransitionWidth = value; context.transitionWidth = m_TransitionWidth = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -412,7 +460,18 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_TransitionSoftness, value)) return; if (Mathf.Approximately(m_TransitionSoftness, value)) return;
context.transitionSoftness = m_TransitionSoftness = value; context.transitionSoftness = m_TransitionSoftness = value;
ApplyContextToMaterial(); SetMaterialDirty();
}
}
public MinMax01 transitionRange
{
get => m_TransitionRange;
set
{
if (m_TransitionRange.Approximately(value)) return;
context.transitionRange = m_TransitionRange = value;
SetMaterialDirty();
} }
} }
@@ -423,7 +482,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionColorFilter == value) return; if (m_TransitionColorFilter == value) return;
context.transitionColorFilter = m_TransitionColorFilter = value; context.transitionColorFilter = m_TransitionColorFilter = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -434,7 +493,7 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionColor == value) return; if (m_TransitionColor == value) return;
context.transitionColor = m_TransitionColor = value; context.transitionColor = m_TransitionColor = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -445,7 +504,30 @@ namespace Coffee.UIEffects
{ {
if (m_TransitionColorGlow == value) return; if (m_TransitionColorGlow == value) return;
context.transitionColorGlow = m_TransitionColorGlow = value; context.transitionColorGlow = m_TransitionColorGlow = value;
ApplyContextToMaterial(); SetMaterialDirty();
}
}
public bool transitionPatternReverse
{
get => m_TransitionPatternReverse;
set
{
if (m_TransitionPatternReverse == value) return;
context.transitionPatternReverse = m_TransitionPatternReverse = value;
SetMaterialDirty();
}
}
public float transitionAutoPlaySpeed
{
get => m_TransitionAutoPlaySpeed;
set
{
value = Mathf.Clamp(value, -5, 5);
if (Mathf.Approximately(m_TransitionAutoPlaySpeed, value)) return;
context.transitionAutoPlaySpeed = m_TransitionAutoPlaySpeed = value;
SetMaterialDirty();
} }
} }
@@ -456,7 +538,7 @@ namespace Coffee.UIEffects
{ {
if (m_TargetMode == value) return; if (m_TargetMode == value) return;
context.targetMode = m_TargetMode = value; context.targetMode = m_TargetMode = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -467,7 +549,7 @@ namespace Coffee.UIEffects
{ {
if (m_TargetColor == value) return; if (m_TargetColor == value) return;
context.targetColor = m_TargetColor = value; context.targetColor = m_TargetColor = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -479,7 +561,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_TargetRange, value)) return; if (Mathf.Approximately(m_TargetRange, value)) return;
context.targetRange = m_TargetRange = value; context.targetRange = m_TargetRange = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -491,7 +573,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_TargetSoftness, value)) return; if (Mathf.Approximately(m_TargetSoftness, value)) return;
context.targetSoftness = m_TargetSoftness = value; context.targetSoftness = m_TargetSoftness = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -504,7 +586,7 @@ namespace Coffee.UIEffects
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert(); (m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
context.srcBlendMode = m_SrcBlendMode; context.srcBlendMode = m_SrcBlendMode;
context.dstBlendMode = m_DstBlendMode; context.dstBlendMode = m_DstBlendMode;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -520,7 +602,7 @@ namespace Coffee.UIEffects
if (m_SrcBlendMode == value) return; if (m_SrcBlendMode == value) return;
context.srcBlendMode = m_SrcBlendMode = value; context.srcBlendMode = m_SrcBlendMode = value;
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert(); m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -536,7 +618,7 @@ namespace Coffee.UIEffects
if (m_DstBlendMode == value) return; if (m_DstBlendMode == value) return;
context.dstBlendMode = m_DstBlendMode = value; context.dstBlendMode = m_DstBlendMode = value;
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert(); m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -606,7 +688,7 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0, 1); value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_ShadowBlurIntensity, value)) return; if (Mathf.Approximately(m_ShadowBlurIntensity, value)) return;
context.shadowBlurIntensity = m_ShadowBlurIntensity = value; context.shadowBlurIntensity = m_ShadowBlurIntensity = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -617,7 +699,7 @@ namespace Coffee.UIEffects
{ {
if (m_ShadowColorFilter == value) return; if (m_ShadowColorFilter == value) return;
context.shadowColorFilter = m_ShadowColorFilter = value; context.shadowColorFilter = m_ShadowColorFilter = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -628,7 +710,7 @@ namespace Coffee.UIEffects
{ {
if (m_ShadowColor == value) return; if (m_ShadowColor == value) return;
context.shadowColor = m_ShadowColor = value; context.shadowColor = m_ShadowColor = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
@@ -639,7 +721,87 @@ namespace Coffee.UIEffects
{ {
if (m_ShadowColorGlow == value) return; if (m_ShadowColorGlow == value) return;
context.shadowColorGlow = m_ShadowColorGlow = value; context.shadowColorGlow = m_ShadowColorGlow = value;
ApplyContextToMaterial(); SetMaterialDirty();
}
}
public EdgeMode edgeMode
{
get => m_EdgeMode;
set
{
if (m_EdgeMode == value) return;
context.edgeMode = m_EdgeMode = value;
SetMaterialDirty();
}
}
public float edgeWidth
{
get => m_EdgeWidth;
set
{
value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_EdgeWidth, value)) return;
context.edgeWidth = m_EdgeWidth = value;
SetMaterialDirty();
}
}
public ColorFilter edgeColorFilter
{
get => m_EdgeColorFilter;
set
{
if (m_EdgeColorFilter == value) return;
context.edgeColorFilter = m_EdgeColorFilter = value;
SetMaterialDirty();
}
}
public Color edgeColor
{
get => m_EdgeColor;
set
{
if (m_EdgeColor == value) return;
context.edgeColor = m_EdgeColor = value;
SetMaterialDirty();
}
}
public float edgeShinyWidth
{
get => m_EdgeShinyWidth;
set
{
value = Mathf.Clamp(value, 0, 1);
if (Mathf.Approximately(m_EdgeShinyWidth, value)) return;
context.edgeShinyWidth = m_EdgeShinyWidth = value;
SetMaterialDirty();
}
}
public float edgeShinyAutoPlaySpeed
{
get => m_EdgeShinyAutoPlaySpeed;
set
{
value = Mathf.Clamp(value, -5, 5);
if (Mathf.Approximately(m_EdgeShinyAutoPlaySpeed, value)) return;
context.edgeShinyAutoPlaySpeed = m_EdgeShinyAutoPlaySpeed = value;
SetMaterialDirty();
}
}
public PatternArea patternArea
{
get => m_PatternArea;
set
{
if (m_PatternArea == value) return;
context.patternArea = m_PatternArea = value;
SetMaterialDirty();
} }
} }
@@ -728,13 +890,13 @@ namespace Coffee.UIEffects
{ {
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert(); (m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
base.OnEnable(); base.OnEnable();
ApplyContextToMaterial(); SetMaterialDirty();
} }
protected override void OnDisable() protected override void OnDisable()
{ {
base.OnDisable(); base.OnDisable();
ApplyContextToMaterial(); SetMaterialDirty();
} }
protected override void OnDestroy() protected override void OnDestroy()
@@ -794,6 +956,7 @@ namespace Coffee.UIEffects
c.samplingFilter = m_SamplingFilter; c.samplingFilter = m_SamplingFilter;
c.samplingIntensity = m_SamplingIntensity; c.samplingIntensity = m_SamplingIntensity;
c.samplingWidth = m_SamplingWidth;
c.transitionFilter = m_TransitionFilter; c.transitionFilter = m_TransitionFilter;
c.transitionRate = m_TransitionRate; c.transitionRate = m_TransitionRate;
@@ -805,9 +968,12 @@ namespace Coffee.UIEffects
c.transitionKeepAspectRatio = m_TransitionKeepAspectRatio; c.transitionKeepAspectRatio = m_TransitionKeepAspectRatio;
c.transitionWidth = m_TransitionWidth; c.transitionWidth = m_TransitionWidth;
c.transitionSoftness = m_TransitionSoftness; c.transitionSoftness = m_TransitionSoftness;
c.transitionRange = m_TransitionRange;
c.transitionColorFilter = m_TransitionColorFilter; c.transitionColorFilter = m_TransitionColorFilter;
c.transitionColor = m_TransitionColor; c.transitionColor = m_TransitionColor;
c.transitionColorGlow = m_TransitionColorGlow; c.transitionColorGlow = m_TransitionColorGlow;
c.transitionPatternReverse = m_TransitionPatternReverse;
c.transitionAutoPlaySpeed = m_TransitionAutoPlaySpeed;
c.targetMode = m_TargetMode; c.targetMode = m_TargetMode;
c.targetColor = m_TargetColor; c.targetColor = m_TargetColor;
@@ -827,6 +993,14 @@ namespace Coffee.UIEffects
c.shadowColor = m_ShadowColor; c.shadowColor = m_ShadowColor;
c.shadowColorGlow = m_ShadowColorGlow; c.shadowColorGlow = m_ShadowColorGlow;
c.edgeMode = m_EdgeMode;
c.edgeWidth = m_EdgeWidth;
c.edgeColorFilter = m_EdgeColorFilter;
c.edgeColor = m_EdgeColor;
c.edgeShinyWidth = m_EdgeShinyWidth;
c.edgeShinyAutoPlaySpeed = m_EdgeShinyAutoPlaySpeed;
c.patternArea = m_PatternArea;
c.gradationMode = m_GradationMode; c.gradationMode = m_GradationMode;
c.gradationColor1 = m_GradationColor1; c.gradationColor1 = m_GradationColor1;
c.gradationColor2 = m_GradationColor2; c.gradationColor2 = m_GradationColor2;
@@ -887,6 +1061,7 @@ namespace Coffee.UIEffects
case TransitionFilter.None: case TransitionFilter.None:
case TransitionFilter.Shiny: case TransitionFilter.Shiny:
case TransitionFilter.Mask: case TransitionFilter.Mask:
case TransitionFilter.Pattern:
return true; return true;
default: default:
return transitionRate < 1; return transitionRate < 1;
@@ -919,6 +1094,7 @@ namespace Coffee.UIEffects
m_SamplingFilter = preset.m_SamplingFilter; m_SamplingFilter = preset.m_SamplingFilter;
m_SamplingIntensity = preset.m_SamplingIntensity; m_SamplingIntensity = preset.m_SamplingIntensity;
m_SamplingWidth = preset.m_SamplingWidth;
m_TransitionFilter = preset.m_TransitionFilter; m_TransitionFilter = preset.m_TransitionFilter;
m_TransitionRate = preset.m_TransitionRate; m_TransitionRate = preset.m_TransitionRate;
@@ -930,9 +1106,12 @@ namespace Coffee.UIEffects
m_TransitionKeepAspectRatio = preset.m_TransitionKeepAspectRatio; m_TransitionKeepAspectRatio = preset.m_TransitionKeepAspectRatio;
m_TransitionWidth = preset.m_TransitionWidth; m_TransitionWidth = preset.m_TransitionWidth;
m_TransitionSoftness = preset.m_TransitionSoftness; m_TransitionSoftness = preset.m_TransitionSoftness;
m_TransitionRange = preset.m_TransitionRange;
m_TransitionColorFilter = preset.m_TransitionColorFilter; m_TransitionColorFilter = preset.m_TransitionColorFilter;
m_TransitionColor = preset.m_TransitionColor; m_TransitionColor = preset.m_TransitionColor;
m_TransitionColorGlow = preset.m_TransitionColorGlow; m_TransitionColorGlow = preset.m_TransitionColorGlow;
m_TransitionPatternReverse = preset.m_TransitionPatternReverse;
m_TransitionAutoPlaySpeed = preset.m_TransitionAutoPlaySpeed;
m_TargetMode = preset.m_TargetMode; m_TargetMode = preset.m_TargetMode;
m_TargetColor = preset.m_TargetColor; m_TargetColor = preset.m_TargetColor;
@@ -952,6 +1131,14 @@ namespace Coffee.UIEffects
m_ShadowColor = preset.m_ShadowColor; m_ShadowColor = preset.m_ShadowColor;
m_ShadowColorGlow = preset.m_ShadowColorGlow; m_ShadowColorGlow = preset.m_ShadowColorGlow;
m_EdgeMode = preset.m_EdgeMode;
m_EdgeWidth = preset.m_EdgeWidth;
m_EdgeColorFilter = preset.m_EdgeColorFilter;
m_EdgeColor = preset.m_EdgeColor;
m_EdgeShinyWidth = preset.m_EdgeShinyWidth;
m_EdgeShinyAutoPlaySpeed = preset.m_EdgeShinyAutoPlaySpeed;
m_PatternArea = preset.m_PatternArea;
m_GradationMode = preset.m_GradationMode; m_GradationMode = preset.m_GradationMode;
m_GradationColor1 = preset.m_GradationColor1; m_GradationColor1 = preset.m_GradationColor1;
m_GradationColor2 = preset.m_GradationColor2; m_GradationColor2 = preset.m_GradationColor2;
@@ -962,7 +1149,6 @@ namespace Coffee.UIEffects
m_GradationRotation = preset.m_GradationRotation; m_GradationRotation = preset.m_GradationRotation;
UpdateContext(context); UpdateContext(context);
ApplyContextToMaterial();
SetVerticesDirty(); SetVerticesDirty();
SetMaterialDirty(); SetMaterialDirty();
} }
@@ -980,6 +1166,7 @@ namespace Coffee.UIEffects
m_SamplingFilter = c.samplingFilter; m_SamplingFilter = c.samplingFilter;
m_SamplingIntensity = c.samplingIntensity; m_SamplingIntensity = c.samplingIntensity;
m_SamplingWidth = c.samplingWidth;
m_TransitionFilter = c.transitionFilter; m_TransitionFilter = c.transitionFilter;
m_TransitionRate = c.transitionRate; m_TransitionRate = c.transitionRate;
@@ -991,9 +1178,12 @@ namespace Coffee.UIEffects
m_TransitionKeepAspectRatio = c.transitionKeepAspectRatio; m_TransitionKeepAspectRatio = c.transitionKeepAspectRatio;
m_TransitionWidth = c.transitionWidth; m_TransitionWidth = c.transitionWidth;
m_TransitionSoftness = c.transitionSoftness; m_TransitionSoftness = c.transitionSoftness;
m_TransitionRange = c.transitionRange;
m_TransitionColorFilter = c.transitionColorFilter; m_TransitionColorFilter = c.transitionColorFilter;
m_TransitionColor = c.transitionColor; m_TransitionColor = c.transitionColor;
m_TransitionColorGlow = c.transitionColorGlow; m_TransitionColorGlow = c.transitionColorGlow;
m_TransitionPatternReverse = c.transitionPatternReverse;
m_TransitionAutoPlaySpeed = c.transitionAutoPlaySpeed;
m_TargetMode = c.targetMode; m_TargetMode = c.targetMode;
m_TargetColor = c.targetColor; m_TargetColor = c.targetColor;
@@ -1014,6 +1204,14 @@ namespace Coffee.UIEffects
m_ShadowColor = c.shadowColor; m_ShadowColor = c.shadowColor;
m_ShadowColorGlow = c.shadowColorGlow; m_ShadowColorGlow = c.shadowColorGlow;
m_EdgeMode = c.edgeMode;
m_EdgeWidth = c.edgeWidth;
m_EdgeColorFilter = c.edgeColorFilter;
m_EdgeColor = c.edgeColor;
m_EdgeShinyWidth = c.edgeShinyWidth;
m_EdgeShinyAutoPlaySpeed = c.edgeShinyAutoPlaySpeed;
m_PatternArea = c.patternArea;
m_GradationMode = c.gradationMode; m_GradationMode = c.gradationMode;
m_GradationColor1 = c.gradationColor1; m_GradationColor1 = c.gradationColor1;
m_GradationColor2 = c.gradationColor2; m_GradationColor2 = c.gradationColor2;
@@ -1024,7 +1222,6 @@ namespace Coffee.UIEffects
m_GradationRotation = c.gradationRotation; m_GradationRotation = c.gradationRotation;
UpdateContext(context); UpdateContext(context);
ApplyContextToMaterial();
SetVerticesDirty(); SetVerticesDirty();
SetMaterialDirty(); SetMaterialDirty();
} }
+9 -151
View File
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Coffee.UIEffectInternal; using Coffee.UIEffectInternal;
using UnityEngine; using UnityEngine;
@@ -6,9 +5,6 @@ using UnityEngine.EventSystems;
using UnityEngine.Profiling; using UnityEngine.Profiling;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEditor; using UnityEditor;
#if TMP_ENABLE
using TMPro;
#endif
[assembly: InternalsVisibleTo("UIEffect")] [assembly: InternalsVisibleTo("UIEffect")]
[assembly: InternalsVisibleTo("Coffee.UIEffect.Editor")] [assembly: InternalsVisibleTo("Coffee.UIEffect.Editor")]
@@ -19,9 +15,6 @@ namespace Coffee.UIEffects
[DisallowMultipleComponent] [DisallowMultipleComponent]
public abstract class UIEffectBase : UIBehaviour, IMeshModifier, IMaterialModifier, ICanvasRaycastFilter public abstract class UIEffectBase : UIBehaviour, IMeshModifier, IMaterialModifier, ICanvasRaycastFilter
{ {
private static readonly VertexHelper s_VertexHelper = new VertexHelper();
private static Mesh s_Mesh;
private static readonly InternalObjectPool<UIEffectContext> s_ContextPool = private static readonly InternalObjectPool<UIEffectContext> s_ContextPool =
new InternalObjectPool<UIEffectContext>(() => new UIEffectContext(), x => true, x => x.Reset()); new InternalObjectPool<UIEffectContext>(() => new UIEffectContext(), x => true, x => x.Reset());
@@ -52,15 +45,6 @@ namespace Coffee.UIEffects
protected override void OnEnable() protected override void OnEnable()
{ {
#if TMP_ENABLE
if (graphic is TextMeshProUGUI)
{
_prevLossyScaleY = transform.lossyScale.y;
Canvas.willRenderCanvases += CheckSDFScaleForTMP;
UIExtraCallbacks.onScreenSizeChanged += SetVerticesDirtyForTMP;
}
#endif
UpdateContext(context); UpdateContext(context);
SetMaterialDirty(); SetMaterialDirty();
SetVerticesDirty(); SetVerticesDirty();
@@ -68,11 +52,6 @@ namespace Coffee.UIEffects
protected override void OnDisable() protected override void OnDisable()
{ {
#if TMP_ENABLE
Canvas.willRenderCanvases -= CheckSDFScaleForTMP;
UIExtraCallbacks.onScreenSizeChanged -= SetVerticesDirtyForTMP;
#endif
MaterialRepository.Release(ref _material); MaterialRepository.Release(ref _material);
SetMaterialDirty(); SetMaterialDirty();
SetVerticesDirty(); SetVerticesDirty();
@@ -153,29 +132,19 @@ namespace Coffee.UIEffects
protected override void OnDidApplyAnimationProperties() protected override void OnDidApplyAnimationProperties()
{ {
UpdateContext(context); UpdateContext(context);
ApplyContextToMaterial(); SetVerticesDirty();
SetMaterialDirty();
} }
public virtual void SetVerticesDirty() public virtual void SetVerticesDirty()
{ {
#if TMP_ENABLE
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
{
if (isActiveAndEnabled)
{
OnTMPChanged(textMeshProUGUI);
}
else if (0 < textMeshProUGUI.textInfo?.meshInfo?.Length
&& 0 < textMeshProUGUI.textInfo.meshInfo[0].vertexCount)
{
textMeshProUGUI.UpdateVertexData();
}
}
else
#endif
if (graphic) if (graphic)
{ {
graphic.SetVerticesDirty(); graphic.SetVerticesDirty();
GraphicProxy.Find(graphic).SetVerticesDirty(graphic);
#if UNITY_EDITOR
EditorApplication.QueuePlayerLoopUpdate();
#endif
} }
} }
@@ -184,6 +153,9 @@ namespace Coffee.UIEffects
if (graphic) if (graphic)
{ {
graphic.SetMaterialDirty(); graphic.SetMaterialDirty();
#if UNITY_EDITOR
EditorApplication.QueuePlayerLoopUpdate();
#endif
} }
} }
@@ -204,120 +176,6 @@ namespace Coffee.UIEffects
#endif #endif
} }
#if TMP_ENABLE
#if UNITY_EDITOR
[InitializeOnLoadMethod]
#else
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
private static void InitializeOnLoad()
{
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
{
if (obj is TextMeshProUGUI textMeshProUGUI)
{
OnTMPChanged(textMeshProUGUI);
}
});
}
private static void OnTMPChanged(TextMeshProUGUI textMeshProUGUI)
{
if (!textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect)) return;
if (!effect || !effect.isActiveAndEnabled) return;
if (!s_Mesh)
{
s_Mesh = new Mesh();
s_Mesh.MarkDynamic();
}
var target = effect is UIEffect uiEffect
? uiEffect
: effect is UIEffectReplica parentReplica
? parentReplica.target
: null;
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
var modifiers = InternalListPool<IMeshModifier>.Rent();
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
{
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
s_VertexHelper.Clear();
meshInfo.mesh.CopyTo(s_VertexHelper, meshInfo.vertexCount, meshInfo.vertexCount * 6 / 4);
if (i == 0)
{
textMeshProUGUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
{
modifier.ModifyMesh(s_VertexHelper);
}
s_VertexHelper.FillMesh(s_Mesh);
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
}
else if (i - 1 < subMeshes.Count)
{
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material);
if (!target || !subMeshUI) break;
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
replica.target = target;
subMeshUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
{
modifier.ModifyMesh(s_VertexHelper);
}
s_VertexHelper.FillMesh(s_Mesh);
replica.ApplyContextToMaterial();
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
}
else
{
break;
}
}
InternalListPool<IMeshModifier>.Return(ref modifiers);
InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
s_Mesh.Clear(false);
}
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material)
{
for (var j = 0; j < subMeshes.Count; j++)
{
if (subMeshes[j].sharedMaterial == material) return subMeshes[j];
}
return null;
}
private void SetVerticesDirtyForTMP()
{
if (graphic && graphic.isActiveAndEnabled)
{
graphic.SetVerticesDirty();
}
}
private void CheckSDFScaleForTMP()
{
var lossyScaleY = transform.lossyScale.y;
if (Mathf.Approximately(_prevLossyScaleY, lossyScaleY)) return;
_prevLossyScaleY = lossyScaleY;
if (graphic is TextMeshProUGUI textMeshProUGUI && graphic.isActiveAndEnabled)
{
OnTMPChanged(textMeshProUGUI);
}
}
private float _prevLossyScaleY;
#endif
public abstract void SetRate(float rate, UIEffectTweener.CullingMask cullingMask); public abstract void SetRate(float rate, UIEffectTweener.CullingMask cullingMask);
public abstract bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera); public abstract bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera);
} }
+84 -10
View File
@@ -20,6 +20,7 @@ namespace Coffee.UIEffects
private static readonly int s_ColorIntensity = Shader.PropertyToID("_ColorIntensity"); private static readonly int s_ColorIntensity = Shader.PropertyToID("_ColorIntensity");
private static readonly int s_ColorGlow = Shader.PropertyToID("_ColorGlow"); private static readonly int s_ColorGlow = Shader.PropertyToID("_ColorGlow");
private static readonly int s_SamplingIntensity = Shader.PropertyToID("_SamplingIntensity"); private static readonly int s_SamplingIntensity = Shader.PropertyToID("_SamplingIntensity");
private static readonly int s_SamplingWidth = Shader.PropertyToID("_SamplingWidth");
private static readonly int s_SamplingScale = Shader.PropertyToID("_SamplingScale"); private static readonly int s_SamplingScale = Shader.PropertyToID("_SamplingScale");
private static readonly int s_TransitionRate = Shader.PropertyToID("_TransitionRate"); private static readonly int s_TransitionRate = Shader.PropertyToID("_TransitionRate");
private static readonly int s_TransitionReverse = Shader.PropertyToID("_TransitionReverse"); private static readonly int s_TransitionReverse = Shader.PropertyToID("_TransitionReverse");
@@ -27,15 +28,23 @@ namespace Coffee.UIEffects
private static readonly int s_TransitionTex_ST = Shader.PropertyToID("_TransitionTex_ST"); private static readonly int s_TransitionTex_ST = Shader.PropertyToID("_TransitionTex_ST");
private static readonly int s_TransitionWidth = Shader.PropertyToID("_TransitionWidth"); private static readonly int s_TransitionWidth = Shader.PropertyToID("_TransitionWidth");
private static readonly int s_TransitionSoftness = Shader.PropertyToID("_TransitionSoftness"); private static readonly int s_TransitionSoftness = Shader.PropertyToID("_TransitionSoftness");
private static readonly int s_TransitionRange = Shader.PropertyToID("_TransitionRange");
private static readonly int s_TransitionColorFilter = Shader.PropertyToID("_TransitionColorFilter"); private static readonly int s_TransitionColorFilter = Shader.PropertyToID("_TransitionColorFilter");
private static readonly int s_TransitionColor = Shader.PropertyToID("_TransitionColor"); private static readonly int s_TransitionColor = Shader.PropertyToID("_TransitionColor");
private static readonly int s_TransitionColorGlow = Shader.PropertyToID("_TransitionColorGlow"); private static readonly int s_TransitionColorGlow = Shader.PropertyToID("_TransitionColorGlow");
private static readonly int s_TransitionPatternReverse = Shader.PropertyToID("_TransitionPatternReverse");
private static readonly int s_TransitionAutoPlaySpeed = Shader.PropertyToID("_TransitionAutoPlaySpeed");
private static readonly int s_TargetColor = Shader.PropertyToID("_TargetColor"); private static readonly int s_TargetColor = Shader.PropertyToID("_TargetColor");
private static readonly int s_TargetRange = Shader.PropertyToID("_TargetRange"); private static readonly int s_TargetRange = Shader.PropertyToID("_TargetRange");
private static readonly int s_TargetSoftness = Shader.PropertyToID("_TargetSoftness"); private static readonly int s_TargetSoftness = Shader.PropertyToID("_TargetSoftness");
private static readonly int s_ShadowColor = Shader.PropertyToID("_ShadowColor"); private static readonly int s_ShadowColor = Shader.PropertyToID("_ShadowColor");
private static readonly int s_ShadowBlurIntensity = Shader.PropertyToID("_ShadowBlurIntensity"); private static readonly int s_ShadowBlurIntensity = Shader.PropertyToID("_ShadowBlurIntensity");
private static readonly int s_ShadowColorGlow = Shader.PropertyToID("_ShadowColorGlow"); private static readonly int s_ShadowColorGlow = Shader.PropertyToID("_ShadowColorGlow");
private static readonly int s_EdgeWidth = Shader.PropertyToID("_EdgeWidth");
private static readonly int s_EdgeColor = Shader.PropertyToID("_EdgeColor");
private static readonly int s_EdgeShinyAutoPlaySpeed = Shader.PropertyToID("_EdgeShinyAutoPlaySpeed");
private static readonly int s_EdgeShinyWidth = Shader.PropertyToID("_EdgeShinyWidth");
private static readonly int s_PatternArea = Shader.PropertyToID("_PatternArea");
private static readonly string[] s_ToneKeywords = private static readonly string[] s_ToneKeywords =
{ {
@@ -81,7 +90,8 @@ namespace Coffee.UIEffects
"TRANSITION_SHINY", "TRANSITION_SHINY",
"TRANSITION_MASK", "TRANSITION_MASK",
"TRANSITION_MELT", "TRANSITION_MELT",
"TRANSITION_BURN" "TRANSITION_BURN",
"TRANSITION_PATTERN"
}; };
private static readonly string[] s_TransitionColorKeywords = private static readonly string[] s_TransitionColorKeywords =
@@ -117,6 +127,26 @@ namespace Coffee.UIEffects
"SHADOW_COLOR_CONTRAST" "SHADOW_COLOR_CONTRAST"
}; };
private static readonly string[] s_EdgeKeywords =
{
"",
"EDGE_PLAIN",
"EDGE_SHINY"
};
private static readonly string[] s_EdgeColorKeywords =
{
"",
"EDGE_COLOR_MULTIPLY",
"EDGE_COLOR_ADDITIVE",
"EDGE_COLOR_SUBTRACTIVE",
"EDGE_COLOR_REPLACE",
"EDGE_COLOR_MULTIPLY_LUMINANCE",
"EDGE_COLOR_MULTIPLY_ADDITIVE",
"EDGE_COLOR_HSV_MODIFIER",
"EDGE_COLOR_CONTRAST"
};
private static readonly Vector2[][] s_ShadowVectors = new[] private static readonly Vector2[][] s_ShadowVectors = new[]
{ {
Array.Empty<Vector2>(), // None Array.Empty<Vector2>(), // None
@@ -142,6 +172,7 @@ namespace Coffee.UIEffects
public SamplingFilter samplingFilter = SamplingFilter.None; public SamplingFilter samplingFilter = SamplingFilter.None;
public float samplingIntensity = 0.5f; public float samplingIntensity = 0.5f;
public float samplingWidth;
public TransitionFilter transitionFilter = TransitionFilter.None; public TransitionFilter transitionFilter = TransitionFilter.None;
public float transitionRate = 0.5f; public float transitionRate = 0.5f;
@@ -153,9 +184,12 @@ namespace Coffee.UIEffects
public bool transitionKeepAspectRatio = true; public bool transitionKeepAspectRatio = true;
public float transitionWidth = 0.2f; public float transitionWidth = 0.2f;
public float transitionSoftness = 0.2f; public float transitionSoftness = 0.2f;
public MinMax01 transitionRange = new MinMax01(0, 1);
public ColorFilter transitionColorFilter = ColorFilter.MultiplyAdditive; public ColorFilter transitionColorFilter = ColorFilter.MultiplyAdditive;
public Color transitionColor = new Color(0f, 0.5f, 1.0f, 1.0f); public Color transitionColor = new Color(0f, 0.5f, 1.0f, 1.0f);
public bool transitionColorGlow; public bool transitionColorGlow;
public bool transitionPatternReverse;
public float transitionAutoPlaySpeed;
public TargetMode targetMode = TargetMode.None; public TargetMode targetMode = TargetMode.None;
public Color targetColor = Color.white; public Color targetColor = Color.white;
@@ -175,6 +209,14 @@ namespace Coffee.UIEffects
public Color shadowColor; public Color shadowColor;
public bool shadowColorGlow; public bool shadowColorGlow;
public EdgeMode edgeMode;
public float edgeWidth;
public ColorFilter edgeColorFilter;
public Color edgeColor;
public float edgeShinyWidth;
public float edgeShinyAutoPlaySpeed;
public PatternArea patternArea;
public GradationMode gradationMode; public GradationMode gradationMode;
public Color gradationColor1; public Color gradationColor1;
public Color gradationColor2; public Color gradationColor2;
@@ -190,7 +232,8 @@ namespace Coffee.UIEffects
|| colorFilter != ColorFilter.None || colorFilter != ColorFilter.None
|| srcBlendMode != BlendMode.One || srcBlendMode != BlendMode.One
|| dstBlendMode != BlendMode.OneMinusSrcAlpha || dstBlendMode != BlendMode.OneMinusSrcAlpha
|| shadowMode != ShadowMode.None; || shadowMode != ShadowMode.None
|| edgeMode != EdgeMode.None;
public void Reset() public void Reset()
{ {
@@ -211,6 +254,7 @@ namespace Coffee.UIEffects
samplingFilter = preset.samplingFilter; samplingFilter = preset.samplingFilter;
samplingIntensity = preset.samplingIntensity; samplingIntensity = preset.samplingIntensity;
samplingWidth = preset.samplingWidth;
transitionFilter = preset.transitionFilter; transitionFilter = preset.transitionFilter;
transitionRate = preset.transitionRate; transitionRate = preset.transitionRate;
@@ -222,9 +266,12 @@ namespace Coffee.UIEffects
transitionRotation = preset.transitionRotation; transitionRotation = preset.transitionRotation;
transitionWidth = preset.transitionWidth; transitionWidth = preset.transitionWidth;
transitionSoftness = preset.transitionSoftness; transitionSoftness = preset.transitionSoftness;
transitionRange = preset.transitionRange;
transitionColor = preset.transitionColor; transitionColor = preset.transitionColor;
transitionColorFilter = preset.transitionColorFilter; transitionColorFilter = preset.transitionColorFilter;
transitionColorGlow = preset.transitionColorGlow; transitionColorGlow = preset.transitionColorGlow;
transitionPatternReverse = preset.transitionPatternReverse;
transitionAutoPlaySpeed = preset.transitionAutoPlaySpeed;
targetMode = preset.targetMode; targetMode = preset.targetMode;
targetColor = preset.targetColor; targetColor = preset.targetColor;
@@ -244,6 +291,14 @@ namespace Coffee.UIEffects
shadowColor = preset.shadowColor; shadowColor = preset.shadowColor;
shadowColorGlow = preset.shadowColorGlow; shadowColorGlow = preset.shadowColorGlow;
edgeMode = preset.edgeMode;
edgeWidth = preset.edgeWidth;
edgeColorFilter = preset.edgeColorFilter;
edgeColor = preset.edgeColor;
edgeShinyAutoPlaySpeed = preset.edgeShinyAutoPlaySpeed;
edgeShinyWidth = preset.edgeShinyWidth;
patternArea = preset.patternArea;
gradationMode = preset.gradationMode; gradationMode = preset.gradationMode;
gradationColor1 = preset.gradationColor1; gradationColor1 = preset.gradationColor1;
gradationColor2 = preset.gradationColor2; gradationColor2 = preset.gradationColor2;
@@ -275,6 +330,7 @@ namespace Coffee.UIEffects
material.SetInt(s_ColorGlow, colorGlow ? 1 : 0); material.SetInt(s_ColorGlow, colorGlow ? 1 : 0);
material.SetFloat(s_SamplingIntensity, Mathf.Clamp01(samplingIntensity)); material.SetFloat(s_SamplingIntensity, Mathf.Clamp01(samplingIntensity));
material.SetFloat(s_SamplingWidth, samplingWidth);
material.SetFloat(s_SamplingScale, actualSamplingScale); material.SetFloat(s_SamplingScale, actualSamplingScale);
material.SetFloat(s_TransitionRate, Mathf.Clamp01(transitionRate)); material.SetFloat(s_TransitionRate, Mathf.Clamp01(transitionRate));
@@ -285,9 +341,12 @@ namespace Coffee.UIEffects
transitionTexOffset.x, transitionTexOffset.y)); transitionTexOffset.x, transitionTexOffset.y));
material.SetFloat(s_TransitionWidth, Mathf.Clamp01(transitionWidth)); material.SetFloat(s_TransitionWidth, Mathf.Clamp01(transitionWidth));
material.SetFloat(s_TransitionSoftness, Mathf.Clamp01(transitionSoftness)); material.SetFloat(s_TransitionSoftness, Mathf.Clamp01(transitionSoftness));
material.SetVector(s_TransitionRange, new Vector2(transitionRange.min, transitionRange.max));
material.SetInt(s_TransitionColorFilter, (int)transitionColorFilter); material.SetInt(s_TransitionColorFilter, (int)transitionColorFilter);
material.SetColor(s_TransitionColor, transitionColor); material.SetColor(s_TransitionColor, transitionColor);
material.SetInt(s_TransitionColorGlow, transitionColorGlow ? 1 : 0); material.SetInt(s_TransitionColorGlow, transitionColorGlow ? 1 : 0);
material.SetInt(s_TransitionPatternReverse, transitionPatternReverse ? 1 : 0);
material.SetFloat(s_TransitionAutoPlaySpeed, transitionAutoPlaySpeed);
material.SetColor(s_TargetColor, targetColor); material.SetColor(s_TargetColor, targetColor);
material.SetFloat(s_TargetRange, Mathf.Clamp01(targetRange)); material.SetFloat(s_TargetRange, Mathf.Clamp01(targetRange));
@@ -308,6 +367,12 @@ namespace Coffee.UIEffects
material.SetColor(s_ShadowColor, shadowColor); material.SetColor(s_ShadowColor, shadowColor);
material.SetInt(s_ShadowColorGlow, shadowColorGlow ? 1 : 0); material.SetInt(s_ShadowColorGlow, shadowColorGlow ? 1 : 0);
material.SetFloat(s_EdgeWidth, Mathf.Clamp01(edgeWidth));
material.SetColor(s_EdgeColor, edgeColor);
material.SetFloat(s_EdgeShinyWidth, Mathf.Clamp01(edgeShinyWidth));
material.SetFloat(s_EdgeShinyAutoPlaySpeed, edgeShinyAutoPlaySpeed);
material.SetInt(s_PatternArea, edgeMode != EdgeMode.None ? (int)patternArea : 0);
SetKeyword(material, s_ToneKeywords, (int)toneFilter); SetKeyword(material, s_ToneKeywords, (int)toneFilter);
SetKeyword(material, s_ColorKeywords, (int)colorFilter); SetKeyword(material, s_ColorKeywords, (int)colorFilter);
SetKeyword(material, s_SamplingKeywords, (int)samplingFilter); SetKeyword(material, s_SamplingKeywords, (int)samplingFilter);
@@ -319,11 +384,7 @@ namespace Coffee.UIEffects
case TransitionFilter.Cutoff: case TransitionFilter.Cutoff:
SetKeyword(material, s_TransitionColorKeywords, (int)ColorFilter.None); SetKeyword(material, s_TransitionColorKeywords, (int)ColorFilter.None);
break; break;
case TransitionFilter.Dissolve: default:
case TransitionFilter.Shiny:
case TransitionFilter.Mask:
case TransitionFilter.Melt:
case TransitionFilter.Burn:
SetKeyword(material, s_TransitionColorKeywords, (int)transitionColorFilter); SetKeyword(material, s_TransitionColorKeywords, (int)transitionColorFilter);
break; break;
} }
@@ -338,6 +399,19 @@ namespace Coffee.UIEffects
break; break;
} }
SetKeyword(material, s_EdgeKeywords, (int)edgeMode);
switch (edgeMode)
{
case EdgeMode.None:
SetKeyword(material, s_EdgeColorKeywords, (int)ColorFilter.None);
break;
default:
SetKeyword(material, s_EdgeColorKeywords, (int)edgeColorFilter);
break;
}
SetKeyword(material, s_TargetKeywords, (int)targetMode); SetKeyword(material, s_TargetKeywords, (int)targetMode);
Profiler.EndSample(); Profiler.EndSample();
@@ -360,9 +434,9 @@ namespace Coffee.UIEffects
public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh, bool canModifyShape) public void ModifyMesh(Graphic graphic, RectTransform transitionRoot, VertexHelper vh, bool canModifyShape)
{ {
var processor = ContextProcessor.FindProcessor(graphic); var effectProxy = GraphicProxy.Find(graphic);
var isText = processor.IsText(graphic); var isText = effectProxy.IsText(graphic);
processor.OnPreModifyMesh(graphic); effectProxy.OnPreModifyMesh(graphic);
var verts = s_WorkingVertices; var verts = s_WorkingVertices;
var expandSize = GetExpandSize(canModifyShape); var expandSize = GetExpandSize(canModifyShape);
+2 -4
View File
@@ -50,13 +50,11 @@ namespace Coffee.UIEffects
value = Mathf.Clamp(value, 0.01f, 100); value = Mathf.Clamp(value, 0.01f, 100);
if (Mathf.Approximately(m_SamplingScale, value)) return; if (Mathf.Approximately(m_SamplingScale, value)) return;
m_SamplingScale = value; m_SamplingScale = value;
ApplyContextToMaterial(); SetMaterialDirty();
} }
} }
public override float actualSamplingScale => target && target.samplingFilter != SamplingFilter.None public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
? Mathf.Clamp(m_SamplingScale, 0.01f, 100)
: 1;
public override bool canModifyShape => m_AllowToModifyMeshShape; public override bool canModifyShape => m_AllowToModifyMeshShape;
+33 -13
View File
@@ -81,6 +81,10 @@ namespace Coffee.UIEffects
[SerializeField] [SerializeField]
private PlayOnEnable m_PlayOnEnable = PlayOnEnable.Forward; private PlayOnEnable m_PlayOnEnable = PlayOnEnable.Forward;
[Tooltip("Reset the tweening time when the component is enabled.")]
[SerializeField]
private bool m_ResetTimeOnEnable = true;
[Tooltip("The wrap mode of the tween.\n" + [Tooltip("The wrap mode of the tween.\n" +
" Once: Clamp the tween value (not loop).\n" + " Once: Clamp the tween value (not loop).\n" +
" Loop: Loop the tween value.\n" + " Loop: Loop the tween value.\n" +
@@ -220,11 +224,13 @@ namespace Coffee.UIEffects
set => m_PlayOnEnable = value; set => m_PlayOnEnable = value;
} }
[Obsolete("UIEffectTweener.restartOnEnable has been deprecated. Use UIEffectTweener.playOnEnable instead")] /// <summary>
public bool restartOnEnable /// Reset the tweening time when the component is enabled..
/// </summary>
public bool resetTimeOnEnable
{ {
get => m_PlayOnEnable != PlayOnEnable.Forward; get => m_ResetTimeOnEnable;
set => m_PlayOnEnable = value ? PlayOnEnable.None : PlayOnEnable.Forward; set => m_ResetTimeOnEnable = value;
} }
/// <summary> /// <summary>
@@ -303,13 +309,13 @@ namespace Coffee.UIEffects
switch (playOnEnable) switch (playOnEnable)
{ {
case PlayOnEnable.KeepDirection: case PlayOnEnable.KeepDirection:
Play(); Play(resetTimeOnEnable);
break; break;
case PlayOnEnable.Forward: case PlayOnEnable.Forward:
PlayForward(); PlayForward(resetTimeOnEnable);
break; break;
case PlayOnEnable.Reverse: case PlayOnEnable.Reverse:
PlayReverse(); PlayReverse(resetTimeOnEnable);
break; break;
} }
} }
@@ -339,6 +345,11 @@ namespace Coffee.UIEffects
ResetTime(); ResetTime();
} }
Play();
}
public void Play()
{
_isPaused = false; _isPaused = false;
if (!isTweening) if (!isTweening)
@@ -347,15 +358,14 @@ namespace Coffee.UIEffects
} }
} }
public void Play() public void PlayForward(bool resetTime)
{ {
ResetTime(); if (resetTime)
_isPaused = false;
if (!isTweening)
{ {
m_OnComplete.Invoke(); ResetTime();
} }
PlayForward();
} }
public void PlayForward() public void PlayForward()
@@ -369,6 +379,16 @@ namespace Coffee.UIEffects
} }
} }
public void PlayReverse(bool resetTime)
{
if (resetTime)
{
ResetTime();
}
PlayReverse();
}
public void PlayReverse() public void PlayReverse()
{ {
direction = Direction.Reverse; direction = Direction.Reverse;
@@ -1,178 +0,0 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if TMP_ENABLE
using TMPro;
#endif
namespace Coffee.UIEffects
{
public class ContextProcessor
{
private static readonly List<ContextProcessor> s_Processors = new List<ContextProcessor>()
{
new ContextProcessor(),
#if TMP_ENABLE
new TmpContextProcessor(),
#endif
};
public static void RegisterProcessor(ContextProcessor processor)
{
// Register only once.
foreach (var p in s_Processors)
{
if (p.GetType() == processor.GetType()) return;
}
s_Processors.Add(processor);
}
public static ContextProcessor FindProcessor(Graphic graphic)
{
for (var i = s_Processors.Count - 1; i >= 0; i--)
{
var p = s_Processors[i];
if (p.IsValid(graphic)) return p;
}
return null;
}
/// <summary>
/// Check if the graphic is valid for this processor.
/// </summary>
protected virtual bool IsValid(Graphic graphic)
{
return graphic;
}
/// <summary>
/// Check if the graphic is a text.
/// </summary>
public virtual bool IsText(Graphic graphic)
{
return graphic is Text;
}
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public virtual void OnPreModifyMesh(Graphic graphic)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
}
}
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
null;
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
vt =>
{
vt.uv0.z -= 8;
vt.uv0.w -= 8;
return vt;
};
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
(vt, uvMask, normalizedX, normalizedY) =>
{
vt.uv0.z = normalizedX;
vt.uv0.w = normalizedY;
vt.uv1 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
return vt;
};
}
#if TMP_ENABLE
internal class TmpContextProcessor : ContextProcessor
{
protected override bool IsValid(Graphic graphic)
{
if (!graphic) return false;
if (graphic is TextMeshProUGUI) return true;
if (graphic is TMP_SubMeshUI sub)
{
// If TMP_SubMeshUI is used for text
return !sub.spriteAsset
|| sub.sharedMaterial != sub.spriteAsset.material;
}
return false;
}
/// <summary>
/// Check if the graphic is a text.
/// </summary>
public override bool IsText(Graphic graphic)
{
return true;
}
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public override void OnPreModifyMesh(Graphic graphic)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord2;
}
}
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
#if UNITY_2023_2_OR_NEWER
null;
#else
(vt, a, b, t) =>
{
// TMP 3.x uses packed UV
vt.uv1.x = PackUV(Vector2.Lerp(UnpackUV(a.uv1.x), UnpackUV(b.uv1.x), t));
return vt;
static float PackUV(Vector2 input)
{
return (int)(input.x * 511) * 4096 + (int)(input.y * 511);
}
static Vector2 UnpackUV(float input)
{
return new Vector2(input / 4096 / 511, input % 4096 / 511);
}
};
#endif
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
vt =>
{
vt.uv1.z -= 8;
vt.uv1.w -= 8;
return vt;
};
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
(vt, uvMask, normalizedX, normalizedY) =>
{
vt.uv1.z = normalizedX;
vt.uv1.w = normalizedY;
vt.uv2 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
return vt;
};
}
#endif
}
@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIEffects
{
public class GraphicProxy
{
private static readonly List<GraphicProxy> s_Proxies = new List<GraphicProxy>()
{
new GraphicProxy()
};
public static void Register(GraphicProxy proxy)
{
// Register only once.
foreach (var p in s_Proxies)
{
if (p.GetType() == proxy.GetType()) return;
}
s_Proxies.Add(proxy);
}
public static GraphicProxy Find(Graphic graphic)
{
if (!graphic) return null;
for (var i = s_Proxies.Count - 1; i >= 0; i--)
{
var p = s_Proxies[i];
if (p.IsValid(graphic)) return p;
}
return null;
}
/// <summary>
/// Check if the graphic is valid for this proxy.
/// </summary>
protected virtual bool IsValid(Graphic graphic)
{
return graphic;
}
/// <summary>
/// Check if the graphic is a text.
/// </summary>
public virtual bool IsText(Graphic graphic)
{
return graphic is Text;
}
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public virtual void OnPreModifyMesh(Graphic graphic)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord1;
}
}
public virtual void SetVerticesDirty(Graphic graphic)
{
}
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
null;
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
vt =>
{
vt.uv0.z -= 8;
vt.uv0.w -= 8;
return vt;
};
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
(vt, uvMask, normalizedX, normalizedY) =>
{
vt.uv0.z = normalizedX;
vt.uv0.w = normalizedY;
vt.uv1 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
return vt;
};
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c6f31259f929a47bf9cbd8f1b921327e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+254
View File
@@ -0,0 +1,254 @@
#if TMP_ENABLE
using System;
using System.Collections.Generic;
using Coffee.UIEffectInternal;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace Coffee.UIEffects
{
internal class TmpProxy : GraphicProxy
{
/// <summary>
/// Check if the graphic is valid for this proxy.
/// </summary>
protected override bool IsValid(Graphic graphic)
{
if (!graphic) return false;
if (graphic is TextMeshProUGUI) return true;
if (graphic is TMP_SubMeshUI sub)
{
// If TMP_SubMeshUI is used for text
return !sub.spriteAsset
|| sub.sharedMaterial != sub.spriteAsset.material;
}
return false;
}
/// <summary>
/// Check if the graphic is a text.
/// </summary>
public override bool IsText(Graphic graphic)
{
return true;
}
/// <summary>
/// Called before modifying the mesh.
/// </summary>
public override void OnPreModifyMesh(Graphic graphic)
{
UIVertexUtil.onLerpVertex = s_OnLerpVertex;
ShadowUtil.onMarkAsShadow = s_OnMarkAsShadow;
UIEffectContext.onModifyVertex = s_OnModifyVertex;
var canvas = graphic.canvas;
if (canvas)
{
canvas.additionalShaderChannels |= AdditionalCanvasShaderChannels.TexCoord2;
}
}
public override void SetVerticesDirty(Graphic graphic)
{
if (graphic is TextMeshProUGUI textMeshProUGUI)
{
s_ChangedInstances.Add(textMeshProUGUI);
}
}
private static readonly Func<UIVertex, UIVertex, UIVertex, float, UIVertex> s_OnLerpVertex =
#if UNITY_2023_2_OR_NEWER
null;
#else
(vt, a, b, t) =>
{
// TMP 3.x uses packed UV
vt.uv1.x = PackUV(Vector2.Lerp(UnpackUV(a.uv1.x), UnpackUV(b.uv1.x), t));
return vt;
static float PackUV(Vector2 input)
{
return (int)(input.x * 511) * 4096 + (int)(input.y * 511);
}
static Vector2 UnpackUV(float input)
{
return new Vector2(input / 4096 / 511, input % 4096 / 511);
}
};
#endif
private static readonly Func<UIVertex, UIVertex> s_OnMarkAsShadow =
vt =>
{
vt.uv1.z -= 8;
vt.uv1.w -= 8;
return vt;
};
private static readonly Func<UIVertex, Rect, float, float, UIVertex> s_OnModifyVertex =
(vt, uvMask, normalizedX, normalizedY) =>
{
vt.uv1.z = normalizedX;
vt.uv1.w = normalizedY;
vt.uv2 = new Vector4(uvMask.xMin, uvMask.yMin, uvMask.xMax, uvMask.yMax);
return vt;
};
private static Mesh s_Mesh;
private static readonly VertexHelper s_VertexHelper = new VertexHelper();
private static readonly HashSet<TextMeshProUGUI> s_ChangedInstances = new HashSet<TextMeshProUGUI>();
private static readonly HashSet<TextMeshProUGUI> s_RegisteredInstances = new HashSet<TextMeshProUGUI>();
private static readonly Dictionary<int, float> s_SdfScaleCache = new Dictionary<int, float>();
#if UNITY_EDITOR
[InitializeOnLoadMethod]
#else
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
private static void InitializeOnLoad()
{
Register(new TmpProxy());
// When the text is changed, add it to the changed list
TMPro_EventManager.TEXT_CHANGED_EVENT.Add(obj =>
{
if (obj is TextMeshProUGUI textMeshProUGUI)
{
s_ChangedInstances.Add(textMeshProUGUI);
}
});
UIExtraCallbacks.onBeforeCanvasRebuild += () =>
{
// Check SDF scale (lossyScale.y) change
var toRemove = InternalListPool<TextMeshProUGUI>.Rent();
foreach (var textMeshProUGUI in s_RegisteredInstances)
{
if (textMeshProUGUI)
{
var id = textMeshProUGUI.GetHashCode();
var lossyScaleY = textMeshProUGUI.transform.lossyScale.y;
// If the scale has changed, add to the changed list
if (s_SdfScaleCache.TryGetValue(id, out var prev)
&& !Mathf.Approximately(prev, lossyScaleY))
{
s_ChangedInstances.Add(textMeshProUGUI);
}
// Update the scale cache
s_SdfScaleCache[id] = textMeshProUGUI.transform.lossyScale.y;
}
// Remove destroyed objects later
else if (!ReferenceEquals(textMeshProUGUI, null))
{
toRemove.Add(textMeshProUGUI);
}
}
// Remove destroyed objects
foreach (var textMeshProUGUI in toRemove)
{
s_SdfScaleCache.Remove(textMeshProUGUI.GetHashCode());
s_RegisteredInstances.Remove(textMeshProUGUI);
}
};
// Modify the changed TMP mesh
UIExtraCallbacks.onAfterCanvasRebuild += () =>
{
foreach (var textMeshProUGUI in s_ChangedInstances)
{
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
ModifyMesh(textMeshProUGUI);
}
s_ChangedInstances.Clear();
};
}
private static void ModifyMesh(TextMeshProUGUI textMeshProUGUI)
{
if (!textMeshProUGUI.TryGetComponent<UIEffectBase>(out var effect)) return;
if (!effect || !effect.isActiveAndEnabled) return;
s_RegisteredInstances.Add(textMeshProUGUI);
if (!s_Mesh)
{
s_Mesh = new Mesh();
s_Mesh.MarkDynamic();
}
var target = effect is UIEffect uiEffect
? uiEffect
: effect is UIEffectReplica parentReplica
? parentReplica.target
: null;
var subMeshes = InternalListPool<TMP_SubMeshUI>.Rent();
var modifiers = InternalListPool<IMeshModifier>.Rent();
textMeshProUGUI.GetComponentsInChildren(subMeshes, 1);
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
{
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
s_VertexHelper.Clear();
meshInfo.mesh.CopyTo(s_VertexHelper, meshInfo.vertexCount, meshInfo.vertexCount * 6 / 4);
if (i == 0)
{
textMeshProUGUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
{
modifier.ModifyMesh(s_VertexHelper);
}
s_VertexHelper.FillMesh(s_Mesh);
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
}
else if (i - 1 < subMeshes.Count)
{
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
if (!target || !subMeshUI) break;
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
replica.target = target;
subMeshUI.GetComponents(modifiers);
foreach (var modifier in modifiers)
{
modifier.ModifyMesh(s_VertexHelper);
}
s_VertexHelper.FillMesh(s_Mesh);
replica.ApplyContextToMaterial();
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
}
else
{
break;
}
}
InternalListPool<IMeshModifier>.Return(ref modifiers);
InternalListPool<TMP_SubMeshUI>.Return(ref subMeshes);
s_Mesh.Clear(false);
}
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material, int start)
{
var count = subMeshes.Count;
for (var j = 0; j < count; j++)
{
var s = subMeshes[(j + start + count) % count];
if (s.sharedMaterial == material) return s;
}
return null;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b2ffc93dc93f34027ad9bfdbfd61caae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -31,6 +31,7 @@ RectTransform:
- {fileID: 3451362614172717415} - {fileID: 3451362614172717415}
- {fileID: 5553160781519274839} - {fileID: 5553160781519274839}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -70,6 +71,7 @@ RectTransform:
m_ConstrainProportionsScale: 1 m_ConstrainProportionsScale: 1
m_Children: [] m_Children: []
m_Father: {fileID: 3775897659628443270} m_Father: {fileID: 3775897659628443270}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
@@ -132,8 +134,11 @@ MonoBehaviour:
m_ColorFilter: 0 m_ColorFilter: 0
m_ColorIntensity: 1 m_ColorIntensity: 1
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0 m_SamplingFilter: 0
m_SamplingIntensity: 0.5 m_SamplingIntensity: 0.5
m_SamplingWidth: 1
m_SamplingScale: 1
m_TransitionFilter: 0 m_TransitionFilter: 0
m_TransitionRate: 0.5 m_TransitionRate: 0.5
m_TransitionReverse: 0 m_TransitionReverse: 0
@@ -144,8 +149,14 @@ MonoBehaviour:
m_TransitionKeepAspectRatio: 1 m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.2 m_TransitionWidth: 0.2
m_TransitionSoftness: 0.2 m_TransitionSoftness: 0.2
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 6 m_TransitionColorFilter: 6
m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1} m_TransitionColor: {r: 0, g: 0.5, b: 1, a: 1}
m_TransitionColorGlow: 0
m_TransitionPatternReverse: 0
m_TransitionAutoPlaySpeed: 0
m_TargetMode: 0 m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1} m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 0.1 m_TargetRange: 0.1
@@ -157,8 +168,54 @@ MonoBehaviour:
m_ShadowDistance: {x: 1, y: -1} m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1 m_ShadowIteration: 1
m_ShadowFade: 0.9 m_ShadowFade: 0.9
m_ShadowEffectOnOrigin: 0
m_ShadowMirrorScale: 0.5 m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
m_EdgeMode: 0
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
--- !u!114 &5537784035359440648 --- !u!114 &5537784035359440648
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -200,9 +257,13 @@ MonoBehaviour:
m_Delay: 0 m_Delay: 0
m_Duration: 1 m_Duration: 1
m_Interval: 0.5 m_Interval: 0.5
m_RestartOnEnable: 1 m_PlayOnEnable: 1
m_ResetTimeOnEnable: 1
m_WrapMode: 3 m_WrapMode: 3
m_UpdateMode: 0 m_UpdateMode: 0
m_OnComplete:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6720690739041738997 --- !u!1 &6720690739041738997
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -216,7 +277,7 @@ GameObject:
- component: {fileID: 603320123414190803} - component: {fileID: 603320123414190803}
- component: {fileID: 3769011095332248825} - component: {fileID: 3769011095332248825}
m_Layer: 5 m_Layer: 5
m_Name: Label m_Name: TITLE
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@@ -235,6 +296,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 3775897659628443270} m_Father: {fileID: 3775897659628443270}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0}
File diff suppressed because it is too large Load Diff
@@ -55,19 +55,21 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct appdata_t struct appdata_t
{ {
float4 vertex : POSITION; float4 vertex : POSITION;
@@ -145,6 +147,7 @@ SubShader {
v2f IN = _fragInput; v2f IN = _fragInput;
float2 uvMove = uv - IN.texcoord0; float2 uvMove = uv - IN.texcoord0;
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0 + uvMove).a); fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0 + uvMove).a);
color.rgb *= color.a;
return color; return color;
} }
#define UIEFFECT_TEXTMESHPRO 1 #define UIEFFECT_TEXTMESHPRO 1
@@ -54,19 +54,21 @@ SubShader{
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct appdata_t struct appdata_t
{ {
float4 vertex : POSITION; float4 vertex : POSITION;
@@ -151,6 +153,7 @@ SubShader{
float2 uvMove = uv - IN.texcoord0; float2 uvMove = uv - IN.texcoord0;
fixed4 color = tex2D(_MainTex, IN.texcoord0 + uvMove); fixed4 color = tex2D(_MainTex, IN.texcoord0 + uvMove);
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
color.rgb *= color.a;
return color; return color;
} }
#define UIEFFECT_TEXTMESHPRO 1 #define UIEFFECT_TEXTMESHPRO 1
@@ -92,20 +92,23 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct vertex_t { struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION; float4 vertex : POSITION;
@@ -124,20 +124,23 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct vertex_t struct vertex_t
{ {
UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID
@@ -55,19 +55,20 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct appdata_t { struct appdata_t {
float4 vertex : POSITION; float4 vertex : POSITION;
fixed4 color : COLOR; fixed4 color : COLOR;
@@ -54,19 +54,20 @@ SubShader{
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct appdata_t { struct appdata_t {
float4 vertex : POSITION; float4 vertex : POSITION;
fixed4 color : COLOR; fixed4 color : COLOR;
@@ -91,21 +91,23 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct vertex_t { struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION; float4 vertex : POSITION;
@@ -124,21 +124,23 @@ SubShader {
#pragma multi_compile __ UNITY_UI_CLIP_RECT #pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP #pragma multi_compile __ UNITY_UI_ALPHACLIP
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
#include "UnityCG.cginc" #include "UnityCG.cginc"
#include "UnityUI.cginc" #include "UnityUI.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc"
#include "Assets/TextMesh Pro/Shaders/TMPro.cginc" #include "Assets/TextMesh Pro/Shaders/TMPro.cginc"
// ==== UIEFFECT START ====
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ====
struct vertex_t { struct vertex_t {
UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID
float4 position : POSITION; float4 position : POSITION;
+176 -53
View File
@@ -1,27 +1,36 @@
#ifndef UI_EFFECT_INCLUDED #ifndef UI_EFFECT_INCLUDED
#define UI_EFFECT_INCLUDED #define UI_EFFECT_INCLUDED
uniform float4 _MainTex_TexelSize; uniform const float4 _MainTex_TexelSize;
uniform float _ToneIntensity; uniform const float _ToneIntensity;
uniform half4 _ColorValue; uniform const half4 _ColorValue;
uniform float _ColorIntensity; uniform const float _ColorIntensity;
uniform int _ColorGlow; uniform const int _ColorGlow;
uniform float _SamplingIntensity; uniform const float _SamplingIntensity;
uniform float _SamplingScale; uniform const float _SamplingWidth;
uniform sampler2D _TransitionTex; uniform const float _SamplingScale;
uniform float4 _TransitionTex_ST; uniform const sampler2D _TransitionTex;
uniform float _TransitionRate; uniform const float4 _TransitionTex_ST;
uniform int _TransitionReverse; uniform const float _TransitionRate;
uniform half4 _TransitionColor; uniform const int _TransitionReverse;
uniform int _TransitionColorGlow; uniform const half4 _TransitionColor;
uniform float _TransitionSoftness; uniform const int _TransitionColorGlow;
uniform float _TransitionWidth; uniform const float _TransitionSoftness;
uniform fixed4 _TargetColor; uniform const float2 _TransitionRange;
uniform float _TargetRange; uniform const float _TransitionWidth;
uniform float _TargetSoftness; uniform const int _TransitionPatternReverse;
uniform float _ShadowBlurIntensity; uniform const float _TransitionAutoPlaySpeed;
uniform half4 _ShadowColor; uniform const fixed4 _TargetColor;
uniform int _ShadowColorGlow; uniform const float _TargetRange;
uniform const float _TargetSoftness;
uniform const float _ShadowBlurIntensity;
uniform const half4 _ShadowColor;
uniform const int _ShadowColorGlow;
uniform const float _EdgeWidth;
uniform const float _EdgeShinyAutoPlaySpeed;
uniform const float _EdgeShinyWidth;
uniform const half4 _EdgeColor;
uniform const int _PatternArea;
// For performance reasons, limit the sampling of blur in TextMeshPro. // For performance reasons, limit the sampling of blur in TextMeshPro.
#ifdef UIEFFECT_TEXTMESHPRO #ifdef UIEFFECT_TEXTMESHPRO
@@ -36,20 +45,28 @@ uniform int _ShadowColorGlow;
#endif #endif
#define TONE_NONE (!TONE_GRAYSCALE && !TONE_SEPIA && !TONE_NEGATIVE && !TONE_RETRO && !TONE_POSTERIZE) #define TONE_NONE (!TONE_GRAYSCALE && !TONE_SEPIA && !TONE_NEGATIVE && !TONE_RETRO && !TONE_POSTERIZE)
#define SAMPLING_NONE (!SAMPLING_BLUR_FAST && !SAMPLING_BLUR_MEDIUM && !SAMPLING_BLUR_DETAIL && !SAMPLING_PIXELATION && !SAMPLING_RGB_SHIFT && !SAMPLING_EDGE) #define SAMPLING_NONE (!SAMPLING_BLUR_FAST && !SAMPLING_BLUR_MEDIUM && !SAMPLING_BLUR_DETAIL && !SAMPLING_PIXELATION && !SAMPLING_RGB_SHIFT && !SAMPLING_EDGE_LUMINANCE && !SAMPLING_EDGE_ALPHA)
#define TRANSITION_NONE (!TRANSITION_FADE && !TRANSITION_CUTOFF && !TRANSITION_DISSOLVE && !TRANSITION_SHINY && !TRANSITION_MASK && !TRANSITION_MELT && !TRANSITION_BURN) #define TRANSITION_NONE (!TRANSITION_FADE && !TRANSITION_CUTOFF && !TRANSITION_DISSOLVE && !TRANSITION_SHINY && !TRANSITION_MASK && !TRANSITION_MELT && !TRANSITION_BURN && !TRANSITION_PATTERN)
#define TARGET_NONE (!TARGET_HUE && !TARGET_LUMINANCE) #define TARGET_NONE (!TARGET_HUE && !TARGET_LUMINANCE)
#define UIEFFECT_SAMPLE(uv) uieffect_frag(uv) #define UIEFFECT_SAMPLE(uv) uieffect_frag(uv)
#define UIEFFECT_SAMPLE_CLAMP(uv, uvMask) uieffect_frag(uv) \ #define UIEFFECT_SAMPLE_CLAMP(uv, uvMask) uieffect_frag(uv) \
* step(uvMask.x, uv.x) * step(uv.x, uvMask.z) \ * step(uvMask.x, uv.x) * step(uv.x, uvMask.z) \
* step(uvMask.y, uv.y) * step(uv.y, uvMask.w) * step(uvMask.y, uv.y) * step(uv.y, uvMask.w)
#define TEX_SAMPLE_CLAMP(uv, uvMask) tex2D(_MainTex, uv) \
* step(uvMask.x, uv.x) * step(uv.x, uvMask.z) \
* step(uvMask.y, uv.y) * step(uv.y, uvMask.w)
float2 texel_size() float2 texel_size()
{ {
return _MainTex_TexelSize.xy * _SamplingScale; return _MainTex_TexelSize.xy * _SamplingScale;
} }
float transition_rate()
{
return frac(_TransitionAutoPlaySpeed * _Time.y + _TransitionRate);
}
float3 rgb_to_hsv(float3 c) float3 rgb_to_hsv(float3 c)
{ {
const float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); const float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
@@ -74,13 +91,23 @@ float inv_lerp(const float from, const float to, const float value)
float transition_alpha(float2 uvLocal) float transition_alpha(float2 uvLocal)
{ {
float2 uv;
#if TRANSITION_NONE #if TRANSITION_NONE
return 1; return 1;
#elif TRANSITION_PATTERN
{
const half scale = lerp(100, 1, _TransitionWidth);
const half2 time = half2(-transition_rate() * 2, 0);
uv = uvLocal * _TransitionTex_ST.xy * scale + _TransitionTex_ST.zw + time;
}
#else
{
uv = uvLocal * _TransitionTex_ST.xy + _TransitionTex_ST.zw;
}
#endif #endif
const float2 uv = uvLocal * _TransitionTex_ST.xy + _TransitionTex_ST.zw;
const float alpha = tex2D(_TransitionTex, uv).a; const float alpha = tex2D(_TransitionTex, uv).a;
return (1 - alpha) * _TransitionReverse + alpha * (1 - _TransitionReverse); return _TransitionReverse ? 1 - alpha : alpha;
} }
@@ -287,6 +314,57 @@ half4 apply_shadow_color_filter(half4 color, const half4 factor, const float int
return color; return color;
} }
half4 apply_edge_color_filter(half4 color, const half4 factor, const float intensity)
{
const half4 inColor = color;
#if EDGE_COLOR_NONE // Color.None
{
return color;
}
#elif EDGE_COLOR_MULTIPLY // Color.Multiply
{
color.rgb = color.rgb * factor.rgb;
}
#elif EDGE_COLOR_ADDITIVE // Color.Additive
{
color.rgb = color.rgb + factor.rgb * color.a;
}
#elif EDGE_COLOR_SUBTRACTIVE // Color.Subtractive
{
color.rgb = color.rgb - factor.rgb * color.a;
}
#elif EDGE_COLOR_REPLACE // Color.Replace
{
color.rgb = factor.rgb * color.a;
}
#elif EDGE_COLOR_MULTIPLY_LUMINANCE // Color.MultiplyLuminance
{
color.rgb = (1 + Luminance(color.rgb)) * factor.rgb / 2 * color.a;
}
#elif EDGE_COLOR_MULTIPLY_ADDITIVE // Color.MultiplyAdditive
{
color.rgb = color.rgb * (1 + factor.rgb);
}
#elif EDGE_COLOR_HSV_MODIFIER // Color.HsvModifier
{
const float3 hsv = rgb_to_hsv(color.rgb);
color.rgb = hsv_to_rgb(hsv + factor.rgb) * color.a * factor.a;
color.a = color.a * factor.a;
}
#elif EDGE_COLOR_CONTRAST // Color.Contrast
{
color.rgb = ((color.rgb - 0.5) * (factor.r + 1) + 0.5 + factor.g * 1.5) * color.a * factor.a;
color.a = color.a * factor.a;
}
#else
{
return color;
}
#endif
color = lerp(inColor, color, intensity);
return color;
}
half4 apply_sampling_filter(float2 uv, const float4 uvMask, const float2 uvLocal) half4 apply_sampling_filter(float2 uv, const float4 uvMask, const float2 uvLocal)
{ {
#if SAMPLING_BLUR_FAST || SAMPLING_BLUR_MEDIUM || SAMPLING_BLUR_DETAIL #if SAMPLING_BLUR_FAST || SAMPLING_BLUR_MEDIUM || SAMPLING_BLUR_DETAIL
@@ -341,7 +419,7 @@ float2 move_transition_filter(const float4 uvMask, const float alpha)
} }
#endif #endif
const float factor = alpha - _TransitionRate * (1 + _TransitionWidth * 1.5) + _TransitionWidth; const float factor = alpha - transition_rate() * (1 + _TransitionWidth * 1.5) + _TransitionWidth;
const float band = max(0, _TransitionWidth - factor); const float band = max(0, _TransitionWidth - factor);
#if TRANSITION_MELT #if TRANSITION_MELT
@@ -357,20 +435,28 @@ float2 move_transition_filter(const float4 uvMask, const float alpha)
return 0; return 0;
} }
half4 apply_transition_filter(half4 color, const float alpha) half4 apply_transition_filter(half4 color, const float alpha, const float2 uvLocal, float edgeFactor)
{ {
#if TRANSITION_FADE // Transition.Fade #if TRANSITION_FADE // Transition.Fade
{ {
color *= saturate(alpha + 1 - _TransitionRate * 2); color *= saturate(alpha + 1 - transition_rate() * 2);
} }
#elif TRANSITION_CUTOFF // Transition.Cutoff #elif TRANSITION_CUTOFF // Transition.Cutoff
{ {
color *= step(0.001, alpha - _TransitionRate); color *= step(0.001, alpha - transition_rate());
}
#elif TRANSITION_PATTERN // Transition.Pattern
{
const half4 patternColor = apply_transition_color_filter(half4(color.rgb, 1), half4(_TransitionColor.rgb * color.a, 1), _TransitionColor.a);
int isPattern = min(inv_lerp(_TransitionRange.x, _TransitionRange.y, uvLocal.x), 0.995) < (_TransitionPatternReverse ? alpha : 1 - alpha);
isPattern = _TransitionPatternReverse ? isPattern : 1 - isPattern;
const float patternFactor = _PatternArea == 0 ? 1 : _PatternArea == 1 ? 1 - edgeFactor : edgeFactor;
color.rgb = lerp(color.rgb, patternColor.rgb, patternFactor * isPattern);
} }
// Transition.Dissolve/Shiny/ShinyOnly/Melt // Transition.Dissolve/Shiny/ShinyOnly/Melt
#elif TRANSITION_DISSOLVE || TRANSITION_SHINY || TRANSITION_MASK || TRANSITION_MELT || TRANSITION_BURN #elif TRANSITION_DISSOLVE || TRANSITION_SHINY || TRANSITION_MASK || TRANSITION_MELT || TRANSITION_BURN
{ {
const float factor = alpha - _TransitionRate * (1 + _TransitionWidth) + _TransitionWidth; const float factor = alpha - transition_rate() * (1 + _TransitionWidth) + _TransitionWidth;
const float softness = max(0.0001, _TransitionWidth * _TransitionSoftness); const float softness = max(0.0001, _TransitionWidth * _TransitionSoftness);
const fixed bandLerp = saturate((_TransitionWidth - factor) * 1 / softness); const fixed bandLerp = saturate((_TransitionWidth - factor) * 1 / softness);
const fixed softLerp = saturate(factor * 2 / softness); const fixed softLerp = saturate(factor * 2 / softness);
@@ -423,24 +509,70 @@ half to_value(float4 c)
return 0; return 0;
} }
float edge(float2 uv, const float4 uvMask, float width)
{
#if EDGE_PLAIN || EDGE_SHINY
const float2 d = texel_size() * lerp(1, 20, width);
float e = 1.0;
// Minimum alpha around the current pixel (12 neighbors)
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(1.0, 0.0)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.866025, 0.5)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.5, 0.866025)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.0, 1.0)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(-0.5, 0.866025)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(-0.866025, 0.5)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(-1.0, 0.0)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(-0.866025, -0.5)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(-0.5, -0.866025)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.0, -1.0)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.5, -0.866025)), uvMask)).a);
e = min(e, (TEX_SAMPLE_CLAMP((uv + d * float2(0.866025, -0.5)), uvMask)).a);
return 1 - inv_lerp(0.15, 0.3, e);
#else
return 0;
#endif
}
int is_edge_shiny(const float2 uvLocal)
{
#if EDGE_SHINY
const float deg = atan2(uvLocal.y - 0.5, uvLocal.x - 0.5) / UNITY_PI;
return frac(_Time.y * _EdgeShinyAutoPlaySpeed + deg) < _EdgeShinyWidth;
#else
return 1;
#endif
}
half4 uieffect_internal(float2 uv, const float4 uvMask, const float2 uvLocal) half4 uieffect_internal(float2 uv, const float4 uvMask, const float2 uvLocal)
{ {
const half alpha = transition_alpha(uvLocal); const half alpha = transition_alpha(uvLocal);
const float edgeFactor = edge(uv, uvMask, _EdgeWidth);
uv += move_transition_filter(uvMask, alpha); uv += move_transition_filter(uvMask, alpha);
half4 color = apply_sampling_filter(uv, uvMask, uvLocal); half4 color = apply_sampling_filter(uv, uvMask, uvLocal);
color = apply_tone_filter(color); color = apply_tone_filter(color);
color = apply_transition_filter(color, alpha); color = apply_transition_filter(color, alpha, uvLocal, edgeFactor);
if (-4 <= uvLocal.x + uvLocal.y) if (-4 <= uvLocal.x + uvLocal.y)
{ {
color = apply_color_filter(color, _ColorValue, _ColorIntensity); #if EDGE_PLAIN || EDGE_SHINY
{
color = apply_color_filter(color, _ColorValue, _ColorIntensity);
const half4 edgeColor = apply_edge_color_filter(color, _EdgeColor, 1);
const int isEdgeShiny = is_edge_shiny(uvLocal);
return lerp(color, edgeColor, edgeFactor * isEdgeShiny);
}
#else
{
return apply_color_filter(color, _ColorValue, _ColorIntensity);
}
#endif
} }
else else
{ {
color = apply_shadow_color_filter(color, _ShadowColor, 1); return apply_shadow_color_filter(color, _ShadowColor, 1);
} }
return color;
} }
half4 uieffect(float2 uv, const float4 uvMask, const float2 uvLocal) half4 uieffect(float2 uv, const float4 uvMask, const float2 uvLocal)
@@ -467,26 +599,17 @@ half4 uieffect(float2 uv, const float4 uvMask, const float2 uvLocal)
#elif SAMPLING_EDGE_LUMINANCE || SAMPLING_EDGE_ALPHA #elif SAMPLING_EDGE_LUMINANCE || SAMPLING_EDGE_ALPHA
{ {
// Pixel size // Pixel size
const float dx = texel_size().x; const float2 d = texel_size() * _SamplingWidth;
const float dy = texel_size().y;
// Pixel values around the current pixel (3x3, 8 neighbors) // Pixel values around the current pixel (3x3, 8 neighbors)
const float2 uv00 = uv + half2(-dx, -dy); const half v00 = to_value(TEX_SAMPLE_CLAMP((uv + half2(-d.x, -d.y)), uvMask));
const half v00 = to_value(UIEFFECT_SAMPLE_CLAMP(uv00, uvMask)); const half v01 = to_value(TEX_SAMPLE_CLAMP((uv + half2(-d.x, 0.0)), uvMask));
const float2 uv01 = uv + half2(-dx, 0.0); const half v02 = to_value(TEX_SAMPLE_CLAMP((uv + half2(-d.x, +d.y)), uvMask));
const half v01 = to_value(UIEFFECT_SAMPLE_CLAMP(uv01, uvMask)); const half v10 = to_value(TEX_SAMPLE_CLAMP((uv + half2(0.0, -d.y)), uvMask));
const float2 uv02 = uv + half2(-dx, +dy); const half v12 = to_value(TEX_SAMPLE_CLAMP((uv + half2(0.0, +d.y)), uvMask));
const half v02 = to_value(UIEFFECT_SAMPLE_CLAMP(uv02, uvMask)); const half v20 = to_value(TEX_SAMPLE_CLAMP((uv + half2(+d.x, -d.y)), uvMask));
const float2 uv10 = uv + half2(0.0, -dy); const half v21 = to_value(TEX_SAMPLE_CLAMP((uv + half2(+d.x, 0.0)), uvMask));
const half v10 = to_value(UIEFFECT_SAMPLE_CLAMP(uv10, uvMask)); const half v22 = to_value(TEX_SAMPLE_CLAMP((uv + half2(+d.x, +d.y)), uvMask));
const float2 uv12 = uv + half2(0.0, +dy);
const half v12 = to_value(UIEFFECT_SAMPLE_CLAMP(uv12, uvMask));
const float2 uv20 = uv + half2(+dx, -dy);
const half v20 = to_value(UIEFFECT_SAMPLE_CLAMP(uv20, uvMask));
const float2 uv21 = uv + half2(+dx, 0.0);
const half v21 = to_value(UIEFFECT_SAMPLE_CLAMP(uv21, uvMask));
const float2 uv22 = uv + half2(+dx, +dy);
const half v22 = to_value(UIEFFECT_SAMPLE_CLAMP(uv22, uvMask));
// Apply Sobel operator // Apply Sobel operator
half sobel_h = v00 * -1.0 + v01 * -2.0 + v02 * -1.0 + v20 * 1.0 + v21 * 2.0 + v22 * 1.0; half sobel_h = v00 * -1.0 + v01 * -2.0 + v02 * -1.0 + v20 * 1.0 + v21 * 2.0 + v22 * 1.0;
+3 -1
View File
@@ -60,9 +60,11 @@
#pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE #pragma shader_feature_local_fragment _ TONE_GRAYSCALE TONE_SEPIA TONE_NEGATIVE TONE_RETRO TONE_POSTERIZE
#pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST #pragma shader_feature_local_fragment _ COLOR_MULTIPLY COLOR_ADDITIVE COLOR_SUBTRACTIVE COLOR_REPLACE COLOR_MULTIPLY_LUMINANCE COLOR_MULTIPLY_ADDITIVE COLOR_HSV_MODIFIER COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA #pragma shader_feature_local_fragment _ SAMPLING_BLUR_FAST SAMPLING_BLUR_MEDIUM SAMPLING_BLUR_DETAIL SAMPLING_PIXELATION SAMPLING_RGB_SHIFT SAMPLING_EDGE_LUMINANCE SAMPLING_EDGE_ALPHA
#pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN #pragma shader_feature_local_fragment _ TRANSITION_FADE TRANSITION_CUTOFF TRANSITION_DISSOLVE TRANSITION_SHINY TRANSITION_MASK TRANSITION_MELT TRANSITION_BURN TRANSITION_PATTERN
#pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST #pragma shader_feature_local_fragment _ TRANSITION_COLOR_MULTIPLY TRANSITION_COLOR_ADDITIVE TRANSITION_COLOR_SUBTRACTIVE TRANSITION_COLOR_REPLACE TRANSITION_COLOR_MULTIPLY_LUMINANCE TRANSITION_COLOR_MULTIPLY_ADDITIVE TRANSITION_COLOR_HSV_MODIFIER TRANSITION_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST #pragma shader_feature_local_fragment _ SHADOW_COLOR_MULTIPLY SHADOW_COLOR_ADDITIVE SHADOW_COLOR_SUBTRACTIVE SHADOW_COLOR_REPLACE SHADOW_COLOR_MULTIPLY_LUMINANCE SHADOW_COLOR_MULTIPLY_ADDITIVE SHADOW_COLOR_HSV_MODIFIER SHADOW_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ EDGE_PLAIN EDGE_SHINY
#pragma shader_feature_local_fragment _ EDGE_COLOR_MULTIPLY EDGE_COLOR_ADDITIVE EDGE_COLOR_SUBTRACTIVE EDGE_COLOR_REPLACE EDGE_COLOR_MULTIPLY_LUMINANCE EDGE_COLOR_MULTIPLY_ADDITIVE EDGE_COLOR_HSV_MODIFIER EDGE_COLOR_CONTRAST
#pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE #pragma shader_feature_local_fragment _ TARGET_HUE TARGET_LUMINANCE
// ==== UIEFFECT END ==== // ==== UIEFFECT END ====
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3884925358288914508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5123527603865469805}
- component: {fileID: 3240541677865467655}
m_Layer: 0
m_Name: Pattern - Dot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &5123527603865469805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3240541677865467655
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ToneFilter: 0
m_ToneIntensity: 0.875
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
m_ColorFilter: 0
m_ColorIntensity: 0.213
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.622
m_SamplingScale: 1
m_TransitionFilter: 8
m_TransitionRate: 0
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: 51cf4ae69d327428fbac4ee73e8587fe, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionRotation: 45
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.5
m_TransitionSoftness: 0.475
m_TransitionRange:
m_Min: 0.5
m_Max: 0.85
m_TransitionColorFilter: 1
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
m_TransitionColorGlow: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
m_TargetSoftness: 0.5
m_BlendType: 1
m_SrcBlendMode: 1
m_DstBlendMode: 10
m_ShadowMode: 0
m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1
m_ShadowFade: 0.9
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_ShadowEdgeWidth: 0.5
m_ShadowShinyDivide: 1
m_ShadowShinyWidth: 0.5
m_ShadowShinySpeed: 0.5
m_ShadowPatternArea: 1
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 177a6881273f54339b39e3e910d8af3b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3884925358288914508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5123527603865469805}
- component: {fileID: 3240541677865467655}
m_Layer: 0
m_Name: Pattern - Square
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &5123527603865469805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3240541677865467655
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ToneFilter: 0
m_ToneIntensity: 0.875
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
m_ColorFilter: 0
m_ColorIntensity: 0.213
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.622
m_SamplingScale: 1
m_TransitionFilter: 8
m_TransitionRate: 0
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: cc44bd7903939479d884303309530771, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionRotation: 45
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.5
m_TransitionSoftness: 0.475
m_TransitionRange:
m_Min: 0.5
m_Max: 0.85
m_TransitionColorFilter: 1
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
m_TransitionColorGlow: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
m_TargetSoftness: 0.5
m_BlendType: 1
m_SrcBlendMode: 1
m_DstBlendMode: 10
m_ShadowMode: 0
m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1
m_ShadowFade: 0.9
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_ShadowEdgeWidth: 0.5
m_ShadowShinyDivide: 1
m_ShadowShinyWidth: 0.5
m_ShadowShinySpeed: 0.5
m_ShadowPatternArea: 1
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 312ff4f95d22a4ddba932b33b53e06d4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3884925358288914508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5123527603865469805}
- component: {fileID: 3240541677865467655}
m_Layer: 0
m_Name: Pattern - Star
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &5123527603865469805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3240541677865467655
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ToneFilter: 0
m_ToneIntensity: 0.875
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
m_ColorFilter: 0
m_ColorIntensity: 0.213
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.622
m_SamplingScale: 1
m_TransitionFilter: 8
m_TransitionRate: 0
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: 0ab909246f72242358deb093241bb627, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionRotation: 45
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.5
m_TransitionSoftness: 0.475
m_TransitionRange:
m_Min: 0.5
m_Max: 0.85
m_TransitionColorFilter: 1
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
m_TransitionColorGlow: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
m_TargetSoftness: 0.5
m_BlendType: 1
m_SrcBlendMode: 1
m_DstBlendMode: 10
m_ShadowMode: 0
m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1
m_ShadowFade: 0.9
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_ShadowEdgeWidth: 0.5
m_ShadowShinyDivide: 1
m_ShadowShinyWidth: 0.5
m_ShadowShinySpeed: 0.5
m_ShadowPatternArea: 1
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 23ce00335d2f64744afca0ec961ad148
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,128 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3884925358288914508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5123527603865469805}
- component: {fileID: 3240541677865467655}
m_Layer: 0
m_Name: Pattern - Stripe
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &5123527603865469805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3240541677865467655
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3884925358288914508}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 938fce054c42f40a3969e27a88d9bdd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ToneFilter: 0
m_ToneIntensity: 0.875
m_ToneParams: {x: 0, y: 0, z: 0, w: 0}
m_ColorFilter: 0
m_ColorIntensity: 0.213
m_Color: {r: 0.16862746, g: 0, b: 0.12038653, a: 1}
m_ColorGlow: 0
m_SamplingFilter: 0
m_SamplingIntensity: 0.622
m_SamplingScale: 1
m_TransitionFilter: 8
m_TransitionRate: 0
m_TransitionReverse: 0
m_TransitionTex: {fileID: 2800000, guid: 40d1a96251dfd4353a7d28680e56c2e7, type: 3}
m_TransitionTexScale: {x: 1, y: 1}
m_TransitionTexOffset: {x: 0, y: 0}
m_TransitionRotation: 45
m_TransitionKeepAspectRatio: 1
m_TransitionWidth: 0.85
m_TransitionSoftness: 0.475
m_TransitionRange:
m_Min: 0
m_Max: 1
m_TransitionColorFilter: 1
m_TransitionColor: {r: 0, g: 0, b: 0, a: 0.5019608}
m_TransitionColorGlow: 0
m_TargetMode: 0
m_TargetColor: {r: 1, g: 1, b: 1, a: 1}
m_TargetRange: 1
m_TargetSoftness: 0.5
m_BlendType: 1
m_SrcBlendMode: 1
m_DstBlendMode: 10
m_ShadowMode: 0
m_ShadowDistance: {x: 1, y: -1}
m_ShadowIteration: 1
m_ShadowFade: 0.9
m_ShadowMirrorScale: 0.5
m_ShadowBlurIntensity: 1
m_ShadowColorFilter: 4
m_ShadowColor: {r: 1, g: 1, b: 1, a: 1}
m_ShadowColorGlow: 0
m_ShadowEdgeWidth: 0.5
m_ShadowShinyWidth: 0.5
m_ShadowShinySpeed: 0.5
m_ShadowPatternArea: 1
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
m_GradationOffset: 0
m_GradationScale: 1
m_GradationRotation: 0
m_AllowToModifyMeshShape: 1
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 538655e7d09c24bd896fbc8d8008e6b8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 51cf4ae69d327428fbac4ee73e8587fe
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 10
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: cc44bd7903939479d884303309530771
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 10
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 0ab909246f72242358deb093241bb627
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 10
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 72 B

@@ -0,0 +1,159 @@
fileFormatVersion: 2
guid: 40d1a96251dfd4353a7d28680e56c2e7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 2
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 10
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "com.coffee.ui-effect", "name": "com.coffee.ui-effect",
"displayName": "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!", "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.2.1", "version": "5.3.3",
"unity": "2020.3", "unity": "2020.3",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
@@ -26,4 +26,7 @@ EditorBuildSettings:
- enabled: 0 - enabled: 0
path: Assets/Demos/PerformanceTest/PerformanceTest.unity path: Assets/Demos/PerformanceTest/PerformanceTest.unity
guid: 3a7d90cc463ac409fa50ecb46480ebc6 guid: 3a7d90cc463ac409fa50ecb46480ebc6
- enabled: 1
path: Assets/Demos/PatternAndEdge/PatternAndEdge.unity
guid: 263e512bc0ad44038af0c3a4e37b6b33
m_configObjects: {} m_configObjects: {}