From be90210e6cbf39133bd829e4bf08b9005dd925f4 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Fri, 10 Apr 2020 11:36:21 +0900 Subject: [PATCH] feat: transfer TextMeshPro support to another package BREAKING CHANGE: TextMeshPro support has been removed from this package. It will be supported by another package. --- .../UIExtensions/UIEffect/ForTMPro.meta | 8 - .../UIEffect/ForTMPro/Editor.meta | 9 - .../ForTMPro/Editor/TMP_SDFShaderGUI.cs | 169 ------- .../ForTMPro/Editor/TMP_SDFShaderGUI.cs.meta | 11 - .../UIEffect/ForTMPro/Shaders.meta | 8 - .../Shaders/TMP_SDF (UIDissolve).shader | 158 ------ .../Shaders/TMP_SDF (UIDissolve).shader.meta | 15 - .../Shaders/TMP_SDF (UIEffect).shader | 174 ------- .../Shaders/TMP_SDF (UIEffect).shader.meta | 15 - .../Shaders/TMP_SDF (UIHsvModifier).shader | 156 ------ .../TMP_SDF (UIHsvModifier).shader.meta | 15 - .../ForTMPro/Shaders/TMP_SDF (UIShiny).shader | 154 ------ .../Shaders/TMP_SDF (UIShiny).shader.meta | 15 - .../Shaders/TMP_SDF (UITransition).shader | 157 ------ .../TMP_SDF (UITransition).shader.meta | 15 - .../TMP_SDF-Mobile (UIDissolve).shader | 122 ----- .../TMP_SDF-Mobile (UIDissolve).shader.meta | 11 - .../Shaders/TMP_SDF-Mobile (UIEffect).shader | 141 ------ .../TMP_SDF-Mobile (UIEffect).shader.meta | 11 - .../TMP_SDF-Mobile (UIHsvModifier).shader | 120 ----- ...TMP_SDF-Mobile (UIHsvModifier).shader.meta | 11 - .../Shaders/TMP_SDF-Mobile (UIShiny).shader | 119 ----- .../TMP_SDF-Mobile (UIShiny).shader.meta | 11 - .../TMP_SDF-Mobile (UITransition).shader | 122 ----- .../TMP_SDF-Mobile (UITransition).shader.meta | 11 - .../Shaders/TMP_Sprite (UIDissolve).shader | 90 ---- .../TMP_Sprite (UIDissolve).shader.meta | 9 - .../Shaders/TMP_Sprite (UIEffect).shader | 111 ----- .../Shaders/TMP_Sprite (UIEffect).shader.meta | 9 - .../Shaders/TMP_Sprite (UIHsvModifier).shader | 87 ---- .../TMP_Sprite (UIHsvModifier).shader.meta | 9 - .../Shaders/TMP_Sprite (UIShiny).shader | 87 ---- .../Shaders/TMP_Sprite (UIShiny).shader.meta | 9 - .../Shaders/TMP_Sprite (UITransition).shader | 90 ---- .../TMP_Sprite (UITransition).shader.meta | 9 - .../ForTMPro/Shaders/UI-Effect-TMPro.cginc | 453 ------------------ .../Shaders/UI-Effect-TMPro.cginc.meta | 9 - 37 files changed, 2730 deletions(-) delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro.meta delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor.meta delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs.meta delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader.meta delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader delete mode 100755 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader.meta delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc delete mode 100644 Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc.meta diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro.meta deleted file mode 100644 index 1772ea0..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 37c4bd2925c96431b827a2031f76add8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor.meta deleted file mode 100644 index 2f60ffc..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b00cb7cc19de648f38332743361bdacb -folderAsset: yes -timeCreated: 1547811341 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs deleted file mode 100644 index 397aa02..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs +++ /dev/null @@ -1,169 +0,0 @@ -#if TMP_PRESENT -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using TMPro.EditorUtilities; -using UnityEditor; -using Coffee.UIExtensions; -using System.IO; -using System.Linq; -using System; - -namespace Coffee.UIEffect.Editors -{ - public class TMP_SDFShaderGUI : TMPro.EditorUtilities.TMP_SDFShaderGUI - { - static GUIStyle s_PanelTitle; - Material currentMaterial; - - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) - { - currentMaterial = materialEditor.target as Material; - base.OnGUI(materialEditor, properties); - } - - protected override void DoGUI() - { - if (currentMaterial.HasProperty("_FaceColor")) - { - base.DoGUI(); - } - else - { - DrawSpritePanel(); - } - - var name = currentMaterial.shader.name; - if (name.EndsWith("(UIEffect)")) - { - DrawEffectPanel(); - } - else if (name.EndsWith("(UIDissolve)")) - { - DrawDissolvePanel(); - } - else if (name.EndsWith("(UIShiny)")) - { - DrawShinyPanel(); - } - else if (name.EndsWith("(UITransition)")) - { - DrawTransitionPanel(); - } - } - - void DrawSpritePanel() - { - if (BeginTmpPanel("Sprite", true)) - { - EditorGUI.indentLevel += 1; - DoTexture2D("_MainTex", "Texture"); - DoColor("_Color", "Color"); - EditorGUI.indentLevel -= 1; - } - EndTmpPanel(); - } - - void DrawDissolvePanel() - { - if (BeginTmpPanel("Dissolve", true)) - { - EditorGUI.indentLevel += 1; - DoTexture2D("_NoiseTex", "Texture"); - DrawEnum(currentMaterial); - EditorGUI.indentLevel -= 1; - } - EndTmpPanel(); - } - - void DrawShinyPanel() - { - } - - void DrawTransitionPanel() - { - if (BeginTmpPanel("Transition", true)) - { - EditorGUI.indentLevel += 1; - DoTexture2D("_NoiseTex", "Texture"); - DrawEnum(currentMaterial); - EditorGUI.indentLevel -= 1; - } - EndTmpPanel(); - } - - void DrawEffectPanel() - { - if (BeginTmpPanel("Effect", true)) - { - EditorGUI.indentLevel += 1; - DrawEnum(currentMaterial); - DrawEnum(currentMaterial); - DrawEnum(currentMaterial); - DrawToggleKeyword(currentMaterial, "Advanced Blur", "EX"); - EditorGUI.indentLevel -= 1; - } - EndTmpPanel(); - } - - static void DrawEnum(Material mat) - { - Type type = typeof(T); - string[] names = System.Enum.GetNames(type); - int[] values = System.Enum.GetValues(type) as int[]; - - int mode = 0; - for (int i = 0; i < names.Length; i++) - { - if (mat.IsKeywordEnabled(names[i].ToUpper())) - mode = values[i]; - } - - var newMode = EditorGUILayout.IntPopup(ObjectNames.NicifyVariableName(type.Name), mode, names, values); - if (mode != newMode) - { - Array.IndexOf(values, mode); - mat.DisableKeyword(names[Array.IndexOf(values, mode)].ToUpper()); - if (newMode != 0) - mat.EnableKeyword(names[Array.IndexOf(values, newMode)].ToUpper()); - } - } - - static void DrawToggleKeyword(Material mat, string label, string keyword) - { - bool value = mat.IsKeywordEnabled(keyword); - if (EditorGUILayout.Toggle(label, value) != value) - { - if (value) - mat.DisableKeyword(keyword); - else - mat.EnableKeyword(keyword); - } - } - - static bool BeginTmpPanel(string panel, bool expanded) - { - if (s_PanelTitle == null) - { - s_PanelTitle = new GUIStyle(EditorStyles.label) { fontStyle = FontStyle.Bold }; - } - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - Rect position = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20f, 18f)); - position.x += 20; - position.width += 6f; - expanded = GUI.Toggle(position, expanded, panel, s_PanelTitle); - EditorGUI.indentLevel++; - EditorGUI.BeginDisabledGroup(false); - return expanded; - } - - static void EndTmpPanel() - { - EditorGUI.EndDisabledGroup(); - EditorGUI.indentLevel--; - EditorGUILayout.EndVertical(); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs.meta deleted file mode 100644 index 1a52b22..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Editor/TMP_SDFShaderGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0163d601911a448eea37923cb9fd6760 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders.meta deleted file mode 100644 index 92fbff8..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1045b92cbd63c45bab65c540449a8ad3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader deleted file mode 100755 index 5263d70..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader +++ /dev/null @@ -1,158 +0,0 @@ -Shader "TextMeshPro/Distance Field (UIDissolve)" { - -Properties { - _FaceTex ("Face Texture", 2D) = "white" {} - _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 - _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineTex ("Outline Texture", 2D) = "white" {} - _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 - _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 - _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 - _OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 - - _Bevel ("Bevel", Range(0,1)) = 0.5 - _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 - _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 - _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 - _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 - - _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 - _SpecularColor ("Specular", Color) = (1,1,1,1) - _SpecularPower ("Specular", Range(0,4)) = 2.0 - _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 - _Diffuse ("Diffuse", Range(0,1)) = 0.5 - _Ambient ("Ambient", Range(1,0)) = 0.5 - - _BumpMap ("Normal map", 2D) = "bump" {} - _BumpOutline ("Bump Outline", Range(0,1)) = 0 - _BumpFace ("Bump Face", Range(0,1)) = 0 - - _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) - _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) - _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } - _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) - - - _UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _GlowColor ("Color", Color) = (0, 1, 0, 0.5) - _GlowOffset ("Offset", Range(-1,1)) = 0 - _GlowInner ("Inner", Range(0,1)) = 0.05 - _GlowOuter ("Outer", Range(0,1)) = 0.05 - _GlowPower ("Falloff", Range(1, 0)) = 0.75 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = 0.5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5.0 - _ScaleX ("Scale X", float) = 1.0 - _ScaleY ("Scale Y", float) = 1.0 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma target 3.0 - #pragma vertex VertShader - #pragma fragment frag - #pragma multi_compile __ BEVEL_ON - #pragma multi_compile __ UNDERLAY_ON UNDERLAY_INNER - #pragma multi_compile __ GLOW_ON - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" - - #define UI_DISSOLVE 1 - #define DISSOLVE 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - #pragma multi_compile __ ADD SUBTRACT FILL - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - //color.rgb *= IN.color.rgb; - - // Dissolve - color = ApplyTransitionEffect(color, IN.eParam); - color.rgb *= color.a; - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - return color * IN.color.a; - } - ENDCG - } -} - -Fallback "TextMeshPro/Mobile/Distance Field (UIDissolve)" -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader.meta deleted file mode 100644 index 30a389b..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIDissolve).shader.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: 983d3d7238f4540e3af421a4abb25e26 -ShaderImporter: - externalObjects: {} - defaultTextures: - - _FaceTex: {instanceID: 0} - - _OutlineTex: {instanceID: 0} - - _BumpMap: {instanceID: 0} - - _Cube: {instanceID: 0} - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader deleted file mode 100755 index 39a6887..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader +++ /dev/null @@ -1,174 +0,0 @@ -Shader "TextMeshPro/Distance Field (UIEffect)" { - -Properties { - _FaceTex ("Face Texture", 2D) = "white" {} - _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 - _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineTex ("Outline Texture", 2D) = "white" {} - _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 - _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 - _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 - _OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 - - _Bevel ("Bevel", Range(0,1)) = 0.5 - _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 - _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 - _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 - _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 - - _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 - _SpecularColor ("Specular", Color) = (1,1,1,1) - _SpecularPower ("Specular", Range(0,4)) = 2.0 - _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 - _Diffuse ("Diffuse", Range(0,1)) = 0.5 - _Ambient ("Ambient", Range(1,0)) = 0.5 - - _BumpMap ("Normal map", 2D) = "bump" {} - _BumpOutline ("Bump Outline", Range(0,1)) = 0 - _BumpFace ("Bump Face", Range(0,1)) = 0 - - _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) - _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) - _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } - _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) - - - _UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _GlowColor ("Color", Color) = (0, 1, 0, 0.5) - _GlowOffset ("Offset", Range(-1,1)) = 0 - _GlowInner ("Inner", Range(0,1)) = 0.05 - _GlowOuter ("Outer", Range(0,1)) = 0.05 - _GlowPower ("Falloff", Range(1, 0)) = 0.75 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = 0.5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5.0 - _ScaleX ("Scale X", float) = 1.0 - _ScaleY ("Scale Y", float) = 1.0 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 -} - -SubShader { - - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma target 3.0 - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ BEVEL_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - #pragma shader_feature __ GLOW_ON - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL - #pragma shader_feature __ ADD SUBTRACT FILL - #pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR - #pragma shader_feature __ EX - - float4 _MainTex_TexelSize; - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" - - #define UI_EFFECT 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - fixed4 param = tex2D(_ParamTex, float2(0.25, IN.eParam)); - fixed effectFactor = param.x; - fixed colorFactor = param.y; - fixed blurFactor = param.z; - fixed3 effectColor = tex2D(_ParamTex, float2(0.75, IN.eParam)).rgb; - - #if PIXEL - half2 pixelSize = max(2, (1-effectFactor*0.95) * float2(_TextureWidth, _TextureHeight)); - UV(IN).xy = round(UV(IN).xy * pixelSize) / pixelSize; - #endif - - #if defined(UI_BLUR) && EX - half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4, IN.uvMask); - #elif defined(UI_BLUR) - half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4); - #else - half4 color = PixShader(IN) * IN.color.a; - #endif - - #if defined (UI_TONE) - color = ApplyToneEffect(color, effectFactor); - #endif - - color = ApplyColorEffect(color, fixed4(effectColor.rgb, colorFactor)); - color.rgb *= color.a; - - return color * IN.color.a; - } - ENDCG - } -} - -Fallback "TextMeshPro/Mobile/Distance Field (UIEffect)" -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader.meta deleted file mode 100644 index 1ad5555..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIEffect).shader.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: fdc3d2db3815548ae9eea37e1be79f36 -ShaderImporter: - externalObjects: {} - defaultTextures: - - _FaceTex: {instanceID: 0} - - _OutlineTex: {instanceID: 0} - - _BumpMap: {instanceID: 0} - - _Cube: {instanceID: 0} - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader deleted file mode 100755 index 14aecb4..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader +++ /dev/null @@ -1,156 +0,0 @@ -Shader "TextMeshPro/Distance Field (UIHsvModifier)" { - -Properties { - _FaceTex ("Face Texture", 2D) = "white" {} - _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 - _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineTex ("Outline Texture", 2D) = "white" {} - _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 - _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 - _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 - _OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 - - _Bevel ("Bevel", Range(0,1)) = 0.5 - _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 - _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 - _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 - _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 - - _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 - _SpecularColor ("Specular", Color) = (1,1,1,1) - _SpecularPower ("Specular", Range(0,4)) = 2.0 - _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 - _Diffuse ("Diffuse", Range(0,1)) = 0.5 - _Ambient ("Ambient", Range(1,0)) = 0.5 - - _BumpMap ("Normal map", 2D) = "bump" {} - _BumpOutline ("Bump Outline", Range(0,1)) = 0 - _BumpFace ("Bump Face", Range(0,1)) = 0 - - _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) - _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) - _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } - _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) - - - _UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _GlowColor ("Color", Color) = (0, 1, 0, 0.5) - _GlowOffset ("Offset", Range(-1,1)) = 0 - _GlowInner ("Inner", Range(0,1)) = 0.05 - _GlowOuter ("Outer", Range(0,1)) = 0.05 - _GlowPower ("Falloff", Range(1, 0)) = 0.75 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = 0.5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5.0 - _ScaleX ("Scale X", float) = 1.0 - _ScaleY ("Scale Y", float) = 1.0 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma target 3.0 - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ BEVEL_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - #pragma shader_feature __ GLOW_ON - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" - - #define UI_HSV_MODIFIER 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - // Hsv - color = ApplyHsvEffect(color, IN.eParam); - color.rgb *= IN.color.rgb; - - return color * IN.color.a; - } - - ENDCG - } -} - -Fallback "TextMeshPro/Mobile/Distance Field (UIHsv)" -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader.meta deleted file mode 100644 index 370b55d..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIHsvModifier).shader.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: 58c5c12ea67b943f2bb08cdba8767f41 -ShaderImporter: - externalObjects: {} - defaultTextures: - - _FaceTex: {instanceID: 0} - - _OutlineTex: {instanceID: 0} - - _BumpMap: {instanceID: 0} - - _Cube: {instanceID: 0} - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader deleted file mode 100755 index ff9c4ca..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader +++ /dev/null @@ -1,154 +0,0 @@ -Shader "TextMeshPro/Distance Field (UIShiny)" { - -Properties { - _FaceTex ("Face Texture", 2D) = "white" {} - _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 - _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineTex ("Outline Texture", 2D) = "white" {} - _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 - _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 - _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 - _OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 - - _Bevel ("Bevel", Range(0,1)) = 0.5 - _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 - _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 - _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 - _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 - - _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 - _SpecularColor ("Specular", Color) = (1,1,1,1) - _SpecularPower ("Specular", Range(0,4)) = 2.0 - _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 - _Diffuse ("Diffuse", Range(0,1)) = 0.5 - _Ambient ("Ambient", Range(1,0)) = 0.5 - - _BumpMap ("Normal map", 2D) = "bump" {} - _BumpOutline ("Bump Outline", Range(0,1)) = 0 - _BumpFace ("Bump Face", Range(0,1)) = 0 - - _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) - _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) - _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } - _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) - - - _UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _GlowColor ("Color", Color) = (0, 1, 0, 0.5) - _GlowOffset ("Offset", Range(-1,1)) = 0 - _GlowInner ("Inner", Range(0,1)) = 0.05 - _GlowOuter ("Outer", Range(0,1)) = 0.05 - _GlowPower ("Falloff", Range(1, 0)) = 0.75 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = 0.5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5.0 - _ScaleX ("Scale X", float) = 1.0 - _ScaleY ("Scale Y", float) = 1.0 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma target 3.0 - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ BEVEL_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - #pragma shader_feature __ GLOW_ON - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" - - #define UI_SHINY 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - // Shiny - color = ApplyShinyEffect(color, IN.eParam); - - return color * IN.color.a; - } - ENDCG - } -} - -Fallback "TextMeshPro/Mobile/Distance Field (UIShiny)" -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader.meta deleted file mode 100644 index 99db294..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UIShiny).shader.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: 7a9c01b59189f4a738528999fa0aa9fe -ShaderImporter: - externalObjects: {} - defaultTextures: - - _FaceTex: {instanceID: 0} - - _OutlineTex: {instanceID: 0} - - _BumpMap: {instanceID: 0} - - _Cube: {instanceID: 0} - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader deleted file mode 100755 index b6a4741..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader +++ /dev/null @@ -1,157 +0,0 @@ -Shader "TextMeshPro/Distance Field (UITransition)" { - -Properties { - _FaceTex ("Face Texture", 2D) = "white" {} - _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 - _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineTex ("Outline Texture", 2D) = "white" {} - _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 - _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 - _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 - _OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 - - _Bevel ("Bevel", Range(0,1)) = 0.5 - _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 - _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 - _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 - _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 - - _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 - _SpecularColor ("Specular", Color) = (1,1,1,1) - _SpecularPower ("Specular", Range(0,4)) = 2.0 - _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 - _Diffuse ("Diffuse", Range(0,1)) = 0.5 - _Ambient ("Ambient", Range(1,0)) = 0.5 - - _BumpMap ("Normal map", 2D) = "bump" {} - _BumpOutline ("Bump Outline", Range(0,1)) = 0 - _BumpFace ("Bump Face", Range(0,1)) = 0 - - _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) - _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) - _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } - _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) - - - _UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _GlowColor ("Color", Color) = (0, 1, 0, 0.5) - _GlowOffset ("Offset", Range(-1,1)) = 0 - _GlowInner ("Inner", Range(0,1)) = 0.05 - _GlowOuter ("Outer", Range(0,1)) = 0.05 - _GlowPower ("Falloff", Range(1, 0)) = 0.75 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = 0.5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5.0 - _ScaleX ("Scale X", float) = 1.0 - _ScaleY ("Scale Y", float) = 1.0 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma target 3.0 - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ BEVEL_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - #pragma shader_feature __ GLOW_ON - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" - - #define ADD 1 - #define UI_TRANSITION 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - #pragma shader_feature __ FADE CUTOFF DISSOLVE - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - // Transition - color = ApplyTransitionEffect(color, IN.eParam); - color.rgb *= color.a; - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - return color * IN.color.a; - } - ENDCG - } -} - -Fallback "TextMeshPro/Mobile/Distance Field (UITransition)" -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader.meta deleted file mode 100644 index 0eac49e..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF (UITransition).shader.meta +++ /dev/null @@ -1,15 +0,0 @@ -fileFormatVersion: 2 -guid: fa7d8d6e393ae4a9b94b2331c7d0097c -ShaderImporter: - externalObjects: {} - defaultTextures: - - _FaceTex: {instanceID: 0} - - _OutlineTex: {instanceID: 0} - - _BumpMap: {instanceID: 0} - - _Cube: {instanceID: 0} - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader deleted file mode 100755 index 0d13042..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader +++ /dev/null @@ -1,122 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "TextMeshPro/Mobile/Distance Field (UIDissolve)" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 - - _UnderlayColor ("Border Color", Color) = (0,0,0,.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ OUTLINE_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - - #define MOBILE 1 - #define UI_DISSOLVE 1 - #define DISSOLVE 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - #pragma shader_feature __ ADD SUBTRACT FILL - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - // Dissolve - color = ApplyTransitionEffect(color, IN.eParam); - color.rgb *= color.a; - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - return color * IN.color.a; - } - ENDCG - } -} - -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader.meta deleted file mode 100644 index 2e47f76..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIDissolve).shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15b053e7702f54708a75b82db8303cba -ShaderImporter: - externalObjects: {} - defaultTextures: - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader deleted file mode 100755 index 317cfdd..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader +++ /dev/null @@ -1,141 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "TextMeshPro/Mobile/Distance Field (UIEffect)" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 - - _UnderlayColor ("Border Color", Color) = (0,0,0,.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ OUTLINE_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL - #pragma shader_feature __ ADD SUBTRACT FILL - #pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR - #pragma shader_feature __ EX - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - - #define MOBILE 1 - #define UI_EFFECT 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - fixed4 param = tex2D(_ParamTex, float2(0.25, IN.eParam)); - fixed effectFactor = param.x; - fixed colorFactor = param.y; - fixed blurFactor = param.z; - fixed3 effectColor = tex2D(_ParamTex, float2(0.75, IN.eParam)).rgb; - - #if PIXEL - half2 pixelSize = max(2, (1-effectFactor*0.95) * float2(_TextureWidth, _TextureHeight)); - UV(IN).xy = round(UV(IN).xy * pixelSize) / pixelSize; - #endif - - #if defined(UI_BLUR) && EX - half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4, IN.uvMask); - #elif defined(UI_BLUR) - half4 color = Tex2DBlurring(IN, blurFactor * float2(1/_TextureWidth, 1/_TextureHeight) * 4); - #else - half4 color = PixShader(IN) * IN.color.a; - #endif - - #if defined (UI_TONE) - color = ApplyToneEffect(color, effectFactor); - #endif - - color = ApplyColorEffect(color, fixed4(effectColor.rgb, colorFactor)); - color.rgb *= color.a; - - return color * IN.color.a; - } - ENDCG - } -} - -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader.meta deleted file mode 100644 index f1b060c..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIEffect).shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: af5de66855c8d4b758264103262d4883 -ShaderImporter: - externalObjects: {} - defaultTextures: - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader deleted file mode 100755 index 35ea899..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader +++ /dev/null @@ -1,120 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "TextMeshPro/Mobile/Distance Field (UIHsvModifier)" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 - - _UnderlayColor ("Border Color", Color) = (0,0,0,.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ OUTLINE_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - - #define MOBILE 1 - #define UI_HSV_MODIFIER 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - // Hsv - color = ApplyHsvEffect(color, IN.eParam); - color.rgb *= IN.color.rgb; - - return color * IN.color.a; - } - ENDCG - } -} - -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader.meta deleted file mode 100644 index 86d2d6a..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIHsvModifier).shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 374467ba16b434455b8886b70c293a0d -ShaderImporter: - externalObjects: {} - defaultTextures: - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader deleted file mode 100755 index c598b5f..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader +++ /dev/null @@ -1,119 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "TextMeshPro/Mobile/Distance Field (UIShiny)" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 - - _UnderlayColor ("Border Color", Color) = (0,0,0,.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ OUTLINE_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - - #define MOBILE 1 - #define UI_SHINY 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - // Shiny - color = ApplyShinyEffect(color, IN.eParam); - - return color * IN.color.a; - } - ENDCG - } -} - -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader.meta deleted file mode 100644 index 847eacb..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UIShiny).shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f852f73c234534dbc9da0e57e661dc9d -ShaderImporter: - externalObjects: {} - defaultTextures: - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader deleted file mode 100755 index 8279ee2..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader +++ /dev/null @@ -1,122 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "TextMeshPro/Mobile/Distance Field (UITransition)" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineColor ("Outline Color", Color) = (0,0,0,1) - _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 - - _UnderlayColor ("Border Color", Color) = (0,0,0,.5) - _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 - _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 - _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 - _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _ShaderFlags ("Flags", float) = 0 - _ScaleRatioA ("Scale RatioA", float) = 1 - _ScaleRatioB ("Scale RatioB", float) = 1 - _ScaleRatioC ("Scale RatioC", float) = 1 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - _MaskSoftnessX ("Mask SoftnessX", float) = 0 - _MaskSoftnessY ("Mask SoftnessY", float) = 0 - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} -} - -SubShader { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - } - - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull [_CullMode] - ZWrite Off - Lighting Off - Fog { Mode Off } - ZTest [unity_GUIZTestMode] - Blend One OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment frag - #pragma shader_feature __ OUTLINE_ON - #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" - - #define MOBILE 1 - #define ADD 1 - #define UI_TRANSITION 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "UI-Effect-TMPro.cginc" - #pragma shader_feature __ FADE CUTOFF DISSOLVE - - fixed4 frag(pixel_t IN) : SV_Target - { - half4 color = PixShader(IN); - - // Transition - color = ApplyTransitionEffect(color, IN.eParam); - color.rgb *= color.a; - - #if UNITY_UI_ALPHACLIP - clip(color.a - 0.001); - #endif - - return color * IN.color.a; - } - ENDCG - } -} - -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader.meta deleted file mode 100644 index 7f35468..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_SDF-Mobile (UITransition).shader.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3158328dfc0344d72bc0e7eaa29cac0e -ShaderImporter: - externalObjects: {} - defaultTextures: - - _MainTex: {instanceID: 0} - - _NoiseTex: {fileID: 2800000, guid: 3e04c247fb2604af186173fce0bc62de, type: 3} - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader deleted file mode 100755 index 4f18be3..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader +++ /dev/null @@ -1,90 +0,0 @@ -Shader "TextMeshPro/Sprite (UIDissolve)" -{ - Properties - { - _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,1) - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - - [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} - } - - SubShader - { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull Off - Lighting Off - ZWrite Off - ZTest [unity_GUIZTestMode] - Blend SrcAlpha OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - - #define TMP_SPRITE 1 - #define UI_DISSOLVE 1 - #define DISSOLVE 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc" - #pragma shader_feature __ ADD SUBTRACT FILL - - fixed4 frag(v2f IN) : SV_Target - { - half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; - - #if UNITY_UI_CLIP_RECT - color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); - #endif - - #ifdef UNITY_UI_ALPHACLIP - clip (color.a - 0.001); - #endif - - // Dissolve - color = ApplyTransitionEffect(color, IN.eParam); - - return color; - } - ENDCG - } - } -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader.meta deleted file mode 100755 index ef2d8f0..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIDissolve).shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 43184227f35f24905865f36834c4fea9 -timeCreated: 1450517184 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader deleted file mode 100755 index 0071c74..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader +++ /dev/null @@ -1,111 +0,0 @@ -Shader "TextMeshPro/Sprite (UIEffect)" -{ - Properties - { - _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,1) - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - - [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} - } - - SubShader - { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull Off - Lighting Off - ZWrite Off - ZTest [unity_GUIZTestMode] - Blend SrcAlpha OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #pragma shader_feature __ GRAYSCALE SEPIA NEGA PIXEL - #pragma shader_feature __ ADD SUBTRACT FILL - #pragma shader_feature __ FASTBLUR MEDIUMBLUR DETAILBLUR - #pragma shader_feature __ EX - - #define TMP_SPRITE 1 - #define UI_EFFECT 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc" - - fixed4 frag(v2f IN) : SV_Target - { - fixed4 param = tex2D(_ParamTex, float2(0.25, IN.eParam)); - fixed effectFactor = param.x; - fixed colorFactor = param.y; - fixed blurFactor = param.z; - fixed3 effectColor = tex2D(_ParamTex, float2(0.75, IN.eParam)).rgb; - - #if PIXEL - half2 pixelSize = max(2, (1-effectFactor*0.95) * _MainTex_TexelSize.zw); - IN.texcoord = round(IN.texcoord * pixelSize) / pixelSize; - #endif - - #if defined(UI_BLUR) && EX - half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, blurFactor * _MainTex_TexelSize.xy * 2, IN.uvMask) + _TextureSampleAdd); - #elif defined(UI_BLUR) - half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, blurFactor * _MainTex_TexelSize.xy * 2) + _TextureSampleAdd); - #else - half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd); - #endif - - color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); - - #if UNITY_UI_ALPHACLIP - clip (color.a - 0.001); - #endif - - #if defined (UI_TONE) - color = ApplyToneEffect(color, effectFactor); - #endif - - color = ApplyColorEffect(color, fixed4(effectColor.rgb, colorFactor)); - color.a *= IN.color.a; - - return color; - } - ENDCG - } - } -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader.meta deleted file mode 100755 index 0b6da9c..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIEffect).shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 466007890ce83421082c2d58b0121dcd -timeCreated: 1450517184 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader deleted file mode 100755 index d8ea01c..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader +++ /dev/null @@ -1,87 +0,0 @@ -Shader "TextMeshPro/Sprite (UIHsvModifier)" -{ - Properties - { - _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,1) - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - - [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} - } - - SubShader - { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull Off - Lighting Off - ZWrite Off - ZTest [unity_GUIZTestMode] - Blend SrcAlpha OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #define TMP_SPRITE 1 - #define UI_HSV_MODIFIER 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc" - - fixed4 frag(v2f IN) : SV_Target - { - half4 color = tex2D(_MainTex, IN.texcoord);// + _TextureSampleAdd) * IN.color; - - #if UNITY_UI_CLIP_RECT - color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); - #endif - - #ifdef UNITY_UI_ALPHACLIP - clip (color.a - 0.001); - #endif - - // Hsv - color = (ApplyHsvEffect(color, IN.eParam)+ _TextureSampleAdd) * IN.color; - - return color; - } - ENDCG - } - } -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader.meta deleted file mode 100755 index 88ffa64..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIHsvModifier).shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1c6bc77283bff44c7aad3f18690f024b -timeCreated: 1450517184 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader deleted file mode 100755 index c21f504..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader +++ /dev/null @@ -1,87 +0,0 @@ -Shader "TextMeshPro/Sprite (UIShiny)" -{ - Properties - { - _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,1) - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - - [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} - } - - SubShader - { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull Off - Lighting Off - ZWrite Off - ZTest [unity_GUIZTestMode] - Blend SrcAlpha OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #define TMP_SPRITE 1 - #define UI_SHINY 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc" - - fixed4 frag(v2f IN) : SV_Target - { - half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; - - #if UNITY_UI_CLIP_RECT - color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); - #endif - - #ifdef UNITY_UI_ALPHACLIP - clip (color.a - 0.001); - #endif - - // Shiny - color = ApplyShinyEffect(color, IN.eParam); - - return color; - } - ENDCG - } - } -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader.meta deleted file mode 100755 index 20af06a..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UIShiny).shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: c518dd47762104054aeb15fbb2092350 -timeCreated: 1450517184 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader deleted file mode 100755 index e88635c..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader +++ /dev/null @@ -1,90 +0,0 @@ -Shader "TextMeshPro/Sprite (UITransition)" -{ - Properties - { - _MainTex ("Sprite Texture", 2D) = "white" {} - _Color ("Tint", Color) = (1,1,1,1) - - _StencilComp ("Stencil Comparison", Float) = 8 - _Stencil ("Stencil ID", Float) = 0 - _StencilOp ("Stencil Operation", Float) = 0 - _StencilWriteMask ("Stencil Write Mask", Float) = 255 - _StencilReadMask ("Stencil Read Mask", Float) = 255 - - _ColorMask ("Color Mask", Float) = 15 - _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) - - [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 - - _NoiseTex("Noise Texture (A)", 2D) = "white" {} - } - - SubShader - { - Tags - { - "Queue"="Transparent" - "IgnoreProjector"="True" - "RenderType"="Transparent" - "PreviewType"="Plane" - "CanUseSpriteAtlas"="True" - } - - Stencil - { - Ref [_Stencil] - Comp [_StencilComp] - Pass [_StencilOp] - ReadMask [_StencilReadMask] - WriteMask [_StencilWriteMask] - } - - Cull Off - Lighting Off - ZWrite Off - ZTest [unity_GUIZTestMode] - Blend SrcAlpha OneMinusSrcAlpha - ColorMask [_ColorMask] - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "UnityUI.cginc" - - #pragma multi_compile __ UNITY_UI_CLIP_RECT - #pragma multi_compile __ UNITY_UI_ALPHACLIP - - #define TMP_SPRITE 1 - #define UI_TRANSITION 1 - #define ADD 1 - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect.cginc" - #include "Assets/Coffee/UIExtensions/UIEffect/Shaders/UI-Effect-Sprite.cginc" - #pragma shader_feature __ FADE CUTOFF DISSOLVE - - fixed4 frag(v2f IN) : SV_Target - { - half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; - - #if UNITY_UI_CLIP_RECT - color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); - #endif - - #ifdef UNITY_UI_ALPHACLIP - clip (color.a - 0.001); - #endif - - // Transition - color = ApplyTransitionEffect(color, IN.eParam); - color.rgb *= color.a; - - return color; - } - ENDCG - } - } -CustomEditor "Coffee.UIEffect.Editors.TMP_SDFShaderGUI" -} diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader.meta deleted file mode 100755 index ae05060..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/TMP_Sprite (UITransition).shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 8a91c64bfdfa7448cb176a87750a6b64 -timeCreated: 1450517184 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc deleted file mode 100644 index 6f09d4c..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc +++ /dev/null @@ -1,453 +0,0 @@ -#ifndef UI_EFFECT_TMPRO_INCLUDED -#define UI_EFFECT_TMPRO_INCLUDED - -// Used by Unity internally to handle Texture Tiling and Offset. -float4 _FaceTex_ST; -float4 _OutlineTex_ST; - - -#if MOBILE -#define UV(x) x.texcoord0 -#define UV2(x) x.texcoord1 - -struct vertex_t { - float4 vertex : POSITION; - float3 normal : NORMAL; - fixed4 color : COLOR; - float2 texcoord0 : TEXCOORD0; - float2 texcoord1 : TEXCOORD1; -#if EX - float2 uvMask : TEXCOORD2; -#endif -}; - -struct pixel_t { - float4 vertex : SV_POSITION; - fixed4 faceColor : COLOR; - fixed4 outlineColor : COLOR1; - float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV - half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) - half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) -#if (UNDERLAY_ON | UNDERLAY_INNER) - float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved - half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) -#endif - fixed4 color : COLOR2; -#if UI_DISSOLVE || UI_TRANSITION - half3 eParam : TEXCOORD5; -#elif UI_SHINY - half2 eParam : TEXCOORD5; -#else - half eParam : TEXCOORD5; -#endif -#if EX - half4 uvMask : TEXCOORD6; -#endif -}; - - -pixel_t VertShader(vertex_t input) -{ - float bold = step(input.texcoord1.y, 0); - - float4 vert = input.vertex; - vert.x += _VertexOffsetX; - vert.y += _VertexOffsetY; - float4 vPosition = UnityObjectToClipPos(vert); - - float2 pixelSize = vPosition.w; - pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); - - float scale = rsqrt(dot(pixelSize, pixelSize)); - scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; - if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); - - float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; - weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; - - float layerScale = scale; - - scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); - float bias = (0.5 - weight) * scale - 0.5; - float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; - -// float opacity = input.color.a; -//#if (UNDERLAY_ON | UNDERLAY_INNER) -// opacity = 1.0; -//#endif - - fixed4 faceColor = input.color * _FaceColor; -// fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; -// faceColor.rgb *= faceColor.a; - - fixed4 outlineColor = _OutlineColor; -// outlineColor.a *= opacity; -// outlineColor.rgb *= outlineColor.a; - outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); - -#if (UNDERLAY_ON | UNDERLAY_INNER) - - layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); - float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); - - float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; - float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; - float2 layerOffset = float2(x, y); -#endif - - // Generate UV for the Masking Texture - float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); - float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); - - // Structure for pixel shader - #if UI_DISSOLVE || UI_TRANSITION - half3 param = UnpackToVec3(input.texcoord0.y); - #elif UI_SHINY - half2 param = UnpackToVec2(input.texcoord0.y); - #else - half param = input.texcoord0.y; - #endif - - #if UI_EFFECT - input.texcoord0 = UnpackToVec2(input.texcoord0.x) * 2 - 0.5; - #else - input.texcoord0 = UnpackToVec2(input.texcoord0.x); - #endif - pixel_t output = { - vPosition, - faceColor, - outlineColor, - float4(input.texcoord0, maskUV.x, maskUV.y), - half4(scale, bias - outline, bias + outline, bias), - half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), - #if (UNDERLAY_ON | UNDERLAY_INNER) - float4(input.texcoord0 + layerOffset, input.color.a, 0), - half2(layerScale, layerBias), - #endif - input.color, - param, - #if EX - half4(UnpackToVec2(input.uvMask.x), UnpackToVec2(input.uvMask.y)), - #endif - }; - - return output; -} - - -// PIXEL SHADER -fixed4 PixShader(pixel_t input) : SV_Target -{ - half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; - half4 c = input.faceColor * saturate(d - input.param.w); - -#ifdef OUTLINE_ON - c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); - c *= saturate(d - input.param.y); -#endif - -#if UNDERLAY_ON - d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; - c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); -#endif - -#if UNDERLAY_INNER - half sd = saturate(d - input.param.z); - d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; - c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); -#endif - -// Alternative implementation to UnityGet2DClipping with support for softness. -#if UNITY_UI_CLIP_RECT - half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); - c *= m.x * m.y; -#endif - -#if (UNDERLAY_ON | UNDERLAY_INNER) -// c *= input.texcoord1.z; -#endif - -// Dissolve -//c = ApplyTransitionEffect(c, input.eParam); -//c.rgb *= c.a; - -#if UNITY_UI_ALPHACLIP - clip(c.a - 0.001); -#endif - - return c; -} - -#else -#define UV(x) x.atlas -#define UV2(x) x.texcoord2 - -struct vertex_t { - float4 position : POSITION; - float3 normal : NORMAL; - fixed4 color : COLOR; - float2 texcoord0 : TEXCOORD0; - float2 texcoord1 : TEXCOORD1; -#if EX - float2 uvMask : TEXCOORD2; -#endif -}; - - -struct pixel_t { - float4 position : SV_POSITION; - fixed4 color : COLOR; - float2 atlas : TEXCOORD0; // Atlas - float4 param : TEXCOORD1; // alphaClip, scale, bias, weight - float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw) - float3 viewDir : TEXCOORD3; - -#if (UNDERLAY_ON || UNDERLAY_INNER) - float4 texcoord2 : TEXCOORD4; // u,v, scale, bias - fixed4 underlayColor : COLOR1; -#endif - float4 textures : TEXCOORD5; -#if UI_DISSOLVE || UI_TRANSITION - half3 eParam : TEXCOORD6; -#elif UI_SHINY - half2 eParam : TEXCOORD6; -#else - half eParam : TEXCOORD6; -#endif -#if EX - half4 uvMask : TEXCOORD7; -#endif -}; - -pixel_t VertShader(vertex_t input) -{ - float bold = step(input.texcoord1.y, 0); - - float4 vert = input.position; - vert.x += _VertexOffsetX; - vert.y += _VertexOffsetY; - - float4 vPosition = UnityObjectToClipPos(vert); - - float2 pixelSize = vPosition.w; - pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); - float scale = rsqrt(dot(pixelSize, pixelSize)); - scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; - if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); - - float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; - weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; - - float bias =(.5 - weight) + (.5 / scale); - - float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA); - -#if GLOW_ON - alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB); -#endif - - alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight; - -#if (UNDERLAY_ON || UNDERLAY_INNER) - float4 underlayColor = _UnderlayColor; - underlayColor.rgb *= underlayColor.a; - - float bScale = scale; - bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale); - float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); - - float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; - float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; - float2 bOffset = float2(x, y); -#endif - - // Generate UV for the Masking Texture - float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); - float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); - - // Support for texture tiling and offset - float2 textureUV = UnpackUV(input.texcoord1.x); - float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); - float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); - - #if UI_DISSOLVE || UI_TRANSITION - half3 param = UnpackToVec3(input.texcoord0.y); - #elif UI_SHINY - half2 param = UnpackToVec2(input.texcoord0.y); - #else - half param = input.texcoord0.y; - #endif - - #if UI_EFFECT - input.texcoord0 = UnpackToVec2(input.texcoord0.x) * 2 - 0.5; - #else - input.texcoord0 = UnpackToVec2(input.texcoord0.x); - #endif - pixel_t output = { - vPosition, - input.color, - input.texcoord0, - float4(alphaClip, scale, bias, weight), - half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), - mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz), - #if (UNDERLAY_ON || UNDERLAY_INNER) - float4(input.texcoord0 + bOffset, bScale, bBias), - underlayColor, - #endif - float4(faceUV, outlineUV), - param, - #if EX - half4(UnpackToVec2(input.uvMask.x), UnpackToVec2(input.uvMask.y)), - #endif - }; - - return output; -} - - -fixed4 PixShader(pixel_t input)// : SV_Target -{ - float c = tex2D(_MainTex, input.atlas).a; - -// #ifndef UNDERLAY_ON -// clip(c - input.param.x); -// #endif - - float scale = input.param.y; - float bias = input.param.z; - float weight = input.param.w; - float sd = (bias - c) * scale; - - float outline = (_OutlineWidth * _ScaleRatioA) * scale; - float softness = (_OutlineSoftness * _ScaleRatioA) * scale; - - half4 faceColor = _FaceColor; - half4 outlineColor = _OutlineColor; - - //faceColor.rgb *= input.color.rgb; - faceColor *= input.color; - - faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); - outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); - - faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); - -#if BEVEL_ON - float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); - float3 n = GetSurfaceNormal(input.atlas, weight, dxy); - - float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; - bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); - n = normalize(n- bump); - - float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); - - float3 col = GetSpecular(n, light); - faceColor.rgb += col*faceColor.a; - faceColor.rgb *= 1-(dot(n, light)*_Diffuse); - faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z); - - fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); - faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; -#endif - -#if UNDERLAY_ON - float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; - faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a); -#endif - -#if UNDERLAY_INNER - float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; - faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a); -#endif - -#if GLOW_ON - float4 glowColor = GetGlowColor(sd, scale); - faceColor.rgb += glowColor.rgb * glowColor.a; -#endif - -// Alternative implementation to UnityGet2DClipping with support for softness. -#if UNITY_UI_CLIP_RECT - half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); - faceColor *= m.x * m.y; -#endif - -//#if UNITY_UI_ALPHACLIP -// clip(faceColor.a - 0.001); -//#endif - - return faceColor; -} - -#endif - -#if defined(UI_BLUR) -fixed4 Tex2DBlurring (pixel_t IN, half2 blur, half4 mask) -{ - #if FASTBLUR && EX - const int KERNEL_SIZE = 5; - const float KERNEL_[5] = { 0.2486, 0.7046, 1.0, 0.7046, 0.2486}; - #elif MEDIUMBLUR && EX - const int KERNEL_SIZE = 9; - const float KERNEL_[9] = { 0.0438, 0.1719, 0.4566, 0.8204, 1.0, 0.8204, 0.4566, 0.1719, 0.0438}; - #elif DETAILBLUR && EX - const int KERNEL_SIZE = 13; - const float KERNEL_[13] = { 0.0438, 0.1138, 0.2486, 0.4566, 0.7046, 0.9141, 1.0, 0.9141, 0.7046, 0.4566, 0.2486, 0.1138, 0.0438}; - #elif FASTBLUR - const int KERNEL_SIZE = 3; - const float KERNEL_[3] = { 0.4566, 1.0, 0.4566}; - #elif MEDIUMBLUR - const int KERNEL_SIZE = 5; - const float KERNEL_[5] = { 0.2486, 0.7046, 1.0, 0.7046, 0.2486}; - #elif DETAILBLUR - const int KERNEL_SIZE = 7; - const float KERNEL_[7] = { 0.1719, 0.4566, 0.8204, 1.0, 0.8204, 0.4566, 0.1719}; - #else - const int KERNEL_SIZE = 1; - const float KERNEL_[1] = { 1.0 }; - #endif - float4 o = 0; - float sum = 0; - float2 shift = 0; - half alpha = IN.color.a; - half2 texcood = UV(IN); - #if UNDERLAY_ON - half2 texcood2 = UV2(IN); - #endif - for(int x = 0; x < KERNEL_SIZE; x++) - { - shift.x = blur.x * (float(x) - KERNEL_SIZE/2); - for(int y = 0; y < KERNEL_SIZE; y++) - { - shift.y = blur.y * (float(y) - KERNEL_SIZE/2); - float2 uv = texcood + shift; - float weight = KERNEL_[x] * KERNEL_[y]; - sum += weight; - UV(IN).xy = uv; - IN.color.a = weight; - - #if UNDERLAY_ON - UV2(IN).xy = texcood2 + shift; - #endif - - #if EX - fixed masked = min(mask.x <= uv.x, uv.x <= mask.z) * min(mask.y <= uv.y, uv.y <= mask.w); - o += lerp(fixed4(0, 0, 0, 0), PixShader(IN) * weight, masked); - #else - o += PixShader(IN) * weight; - #endif - } - } - IN.color.a = alpha; - return o / sum;// * alpha; -} - -fixed4 Tex2DBlurring (pixel_t IN, half2 blur) -{ - return Tex2DBlurring(IN, blur, half4(0,0,1,1)); -} -#endif - - - -#endif // UI_EFFECT_TMPRO_INCLUDED diff --git a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc.meta b/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc.meta deleted file mode 100644 index 80537ae..0000000 --- a/Assets/Coffee/UIExtensions/UIEffect/ForTMPro/Shaders/UI-Effect-TMPro.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: c6f704fc82d194f60ac2b8884db48ffe -timeCreated: 1487915863 -licenseType: Pro -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: