Compare commits

...

10 Commits

Author SHA1 Message Date
Takashi Sakai 2d46d47566 Merge pull request #31 from mob-sakai/release
Release 1.5.0
2018-01-16 14:51:01 +09:00
Takashi Sakai ac2ef42521 Release 1.5.0 2018-01-16 14:47:45 +09:00
Takashi Sakai 5648bd6020 Demo: Add hue shift, shadow3, gradient 2018-01-16 11:54:42 +09:00
Takashi Sakai 9d4a2e64f9 Merge pull request #30 from mob-sakai/master
Merge 1.4.4
2018-01-16 11:53:24 +09:00
Takashi Sakai 55b8de2855 Merge pull request #23 from mob-sakai/feature/shadow3
Feature: Add ShadowMode: Shadow3. #11
2018-01-15 15:54:00 +09:00
Takashi Sakai 303fcfbe64 Feature: Add ShadowMode: Shadow3. #11 2018-01-15 15:52:49 +09:00
Takashi Sakai 782ae2b1c3 Merge pull request #24 from mob-sakai/feature/gradient
Feature: Gradient. #7
2018-01-15 15:52:29 +09:00
Takashi Sakai b18c3bf387 Feature: Gradient. #7 2018-01-15 15:50:53 +09:00
Takashi Sakai bf4116b9ab Merge pull request #17 from mob-sakai/feature/hue
Feature: Add tone effect `Hue Shift`. #8
2018-01-15 15:46:46 +09:00
Takashi Sakai deb632081e Feature: Add tone effect Hue Shift. #8 2018-01-15 15:40:33 +09:00
79 changed files with 7411 additions and 506 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ namespace UnityEditor.UI
CreateMaterialVariant(
Shader.Find(UIEffectCapturedImage.shaderName)
, new []{ ToneMode.None, ToneMode.Grayscale, ToneMode.Sepia, ToneMode.Nega, ToneMode.Pixel, }
, new []{ ToneMode.None, ToneMode.Grayscale, ToneMode.Sepia, ToneMode.Nega, ToneMode.Pixel, ToneMode.Hue, }
, (ColorMode[])Enum.GetValues(typeof(ColorMode))
, (BlurMode[])Enum.GetValues(typeof(BlurMode))
);
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1edb2b7979e364afba561a955f4708ba
guid: e129a7bccac914fc0b15dab3c2395cd3
timeCreated: 1488199687
licenseType: Pro
NativeFormatImporter:
+231 -6
View File
@@ -5,7 +5,7 @@ AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mono
m_Name: Transition
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
@@ -46,6 +46,46 @@ AnimationClip:
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -180
inSlope: 0
outSlope: 180
tangentMode: 21
- time: 2
value: 180
inSlope: 180
outSlope: 0
tangentMode: 21
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Rotation
path:
classID: 114
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
@@ -60,6 +100,18 @@ AnimationClip:
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3746581727
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3305885265
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
classID: 114
customType: 24
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@@ -112,6 +164,46 @@ AnimationClip:
path:
classID: 114
script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: -180
inSlope: 0
outSlope: 180
tangentMode: 21
- time: 2
value: 180
inSlope: 180
outSlope: 0
tangentMode: 21
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Rotation
path:
classID: 114
script: {fileID: 11500000, guid: 3fb48d82dc0e94a2b9246d17d04f8748, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
@@ -145,7 +237,7 @@ AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blur
m_Name: Capture
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
@@ -186,6 +278,26 @@ AnimationClip:
path:
classID: 114
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
@@ -200,6 +312,12 @@ AnimationClip:
classID: 114
customType: 0
isPPtrCurve: 0
- path: 0
attribute: 3305885265
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
classID: 114
customType: 24
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@@ -252,6 +370,26 @@ AnimationClip:
path:
classID: 114
script: {fileID: 11500000, guid: e96dacbf1b116f64da658fbad66839e2, type: 3}
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
- time: 3
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
@@ -264,6 +402,93 @@ AnimationClip:
floatParameter: 0
intParameter: 0
messageOptions: 0
--- !u!74 &7437890
AnimationClip:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Idle
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_PPtrCurves: []
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- path: 0
attribute: 3305885265
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
classID: 114
customType: 24
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 31
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 114
script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events: []
--- !u!74 &7450624
AnimationClip:
m_ObjectHideFlags: 3
@@ -454,7 +679,7 @@ AnimatorController:
m_Name: Transition
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Blur
- m_Name: Capture
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
@@ -532,7 +757,7 @@ AnimatorStateTransition:
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Blur
m_ConditionEvent: Capture
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 110202250}
@@ -610,7 +835,7 @@ AnimatorState:
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 0}
m_Motion: {fileID: 7437890}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
@@ -621,7 +846,7 @@ AnimatorState:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blur
m_Name: Capture
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
+101
View File
@@ -0,0 +1,101 @@
using UnityEngine;
using UnityEngine.UI;
namespace UnityEditor.UI
{
/// <summary>
/// UIEffect editor.
/// </summary>
[CustomEditor(typeof(UIGradient))]
[CanEditMultipleObjects]
public class UIGradientEditor : Editor
{
public override void OnInspectorGUI()
{
serializedObject.Update();
//================
// Direction.
//================
var spDirection = serializedObject.FindProperty("m_Direction");
EditorGUILayout.PropertyField(spDirection);
//================
// Color.
//================
var spColor1 = serializedObject.FindProperty("m_Color1");
var spColor2 = serializedObject.FindProperty("m_Color2");
var spColor3 = serializedObject.FindProperty("m_Color3");
var spColor4 = serializedObject.FindProperty("m_Color4");
switch ((UIGradient.Direction)spDirection.intValue)
{
case UIGradient.Direction.Horizontal:
EditorGUILayout.PropertyField(spColor1, new GUIContent("Left"));
EditorGUILayout.PropertyField(spColor2, new GUIContent("Right"));
break;
case UIGradient.Direction.Vertical:
EditorGUILayout.PropertyField(spColor1, new GUIContent("Top"));
EditorGUILayout.PropertyField(spColor2, new GUIContent("Bottom"));
break;
case UIGradient.Direction.Angle:
EditorGUILayout.PropertyField(spColor1, new GUIContent("Color 1"));
EditorGUILayout.PropertyField(spColor2, new GUIContent("Color 2"));
break;
case UIGradient.Direction.Diagonal:
Rect r = EditorGUILayout.GetControlRect(false, 34);
r = EditorGUI.PrefixLabel(r, new GUIContent("Diagonal Color"));
float w = r.width / 2;
EditorGUI.PropertyField(new Rect(r.x, r.y, w, 16), spColor3, GUIContent.none);
EditorGUI.PropertyField(new Rect(r.x + w, r.y, w, 16), spColor4, GUIContent.none);
EditorGUI.PropertyField(new Rect(r.x, r.y + 18, w, 16), spColor1, GUIContent.none);
EditorGUI.PropertyField(new Rect(r.x + w, r.y + 18, w, 16), spColor2, GUIContent.none);
break;
}
//================
// Angle.
//================
if ((int)UIGradient.Direction.Angle <= spDirection.intValue)
{
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Rotation"));
}
//================
// Offset.
//================
if ((int)UIGradient.Direction.Diagonal == spDirection.intValue)
{
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset1"), new GUIContent("Vertical Offset"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset2"), new GUIContent("Horizontal Offset"));
}
else
{
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Offset1"), new GUIContent("Offset"));
}
//================
// Advanced options.
//================
EditorGUILayout.Space();
EditorGUILayout.LabelField("Advanced Options", EditorStyles.boldLabel);
EditorGUI.indentLevel++;
{
if ((target as UIGradient).graphic is Text)
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_GradientStyle"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_ColorSpace"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("m_IgnoreAspectRatio"));
}
EditorGUI.indentLevel--;
serializedObject.ApplyModifiedProperties();
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c28dcc885fbba4a5187a6a1aa5fb1b3b
timeCreated: 1515895646
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Add-Detail
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ad6e393d9f8e1e443ba2cf0d0825c451
timeCreated: 1515678952
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Add-Fast
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 77d6171819a14d446b2ee7ee0a0e0902
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Add-Medium
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 174dc1d94a419b44e978340f893660b8
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Add
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6b3311fec5bc2194cbb591460dc1edb2
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Detail
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a12d661c136ed2f49b7053e644ced18d
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Fast
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2410725bfdc6d1f41b91ce5bce2cd5cc
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Medium
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5631b2ceb0b863f46a8d31defa4688d5
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Set-Detail
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9ce37e1c8fb47ea4caa2d8a2b24fb24b
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Set-Fast
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ccba79b1436d557499004fa50ad0ee24
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Set-Medium
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6c15ad9ec23bba542b2736f1cea0b965
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Set
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73dfc0c7c08f3354883bc5f689a070f5
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Sub-Detail
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eb2796dca1394ef499e8fb3925ecc817
timeCreated: 1515678952
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Sub-Fast
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3f7fba34b01e150469ff10c154c5320a
timeCreated: 1515678952
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Sub-Medium
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c68946bef088aa4987a46575a7fc2f4
timeCreated: 1515678952
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue-Sub
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 07873c4503a12f948b5850a1e1cdcd62
timeCreated: 1515678952
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-Effect-Hue
m_Shader: {fileID: 4800000, guid: b868e81d0156245e08c8646b4fb68d7a, type: 3}
m_ShaderKeywords: UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _Stencil
second: 0
data:
first:
name: _StencilComp
second: 8
data:
first:
name: _StencilOp
second: 0
data:
first:
name: _StencilReadMask
second: 255
data:
first:
name: _StencilWriteMask
second: 255
data:
first:
name: _ColorMask
second: 15
data:
first:
name: _UseUIAlphaClip
second: 0
m_Colors:
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 43e23c4a656ae664fb76760f35db1c75
timeCreated: 1515678951
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Add-Detail
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bd4c9e4593282a046a0e2ae0525d25a0
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Add-Fast
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1b1dd64d2ae36634b83dbb2f1293089a
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Add-Medium
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 464ad4725835d3145b1cb067c7943f56
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Add
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_COLOR_ADD UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 37d2d45d8935a9f4abd8940baebd0e0c
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Detail
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 53711548e49ae6547a2ec1a969988cd3
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Fast
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8f740238ed0030f4ab9986d6765cf071
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Medium
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e9b879fd1699a6049a90e23c7ba9370a
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Set-Detail
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 38fea59d01d37164fa6259befd34e2b2
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Set-Fast
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9487a1d7bd7b03c4aae5806fc97b8dd6
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Set-Medium
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a6f4a6a66991437419573c4dd2c66293
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Set
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_COLOR_SET UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e5da2ea71588a344cb9e4901fcdec3a1
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Sub-Detail
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_DETAIL UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4c1a7901f3007d04a95a66ac80745d21
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Sub-Fast
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_FAST UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a71b07c8f7ced6d48901e28ae1e40205
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Sub-Medium
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_BLUR_MEDIUM UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8ae50fc63e4dbe94da73f623ae9749dd
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue-Sub
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_COLOR_SUB UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ff6ad692c2aa112449689c150899b0fb
timeCreated: 1515680207
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 8
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UI-EffectCapture-Hue
m_Shader: {fileID: 4800000, guid: 7a6f925a07c3c5846a1c782eaaeb7087, type: 3}
m_ShaderKeywords: UI_TONE_HUE
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Colors: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f9eea82ddb1832947b2d32f13139815b
timeCreated: 1515680206
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
+82 -16
View File
@@ -1,31 +1,40 @@
UIEffect
===
![image](https://user-images.githubusercontent.com/12690315/34617503-054e958e-f27f-11e7-89d5-9cced222883a.png)
[WebGL Demo](https://developer.cloud.unity3d.com/share/WyQetw3p-X/webgl/)
![image](https://user-images.githubusercontent.com/12690315/34973050-c7f3b262-fac8-11e7-8feb-64b656190532.png)
Easy to use effects for uGUI. Supports following effects.
* Grayscale tone
* Grayscale
* Sepia tone
* Nega tone
* Pixelation
* Hue shift
* Cutoff (alpha-based)
* Mono (alpha-based)
* Color setting
* Color override
* Color additive
* Color subtract
* Blur fast(3x4)
* Blur medium(6x4)
* Blur detail(6x8)
* Shadow with effect
* Shadow
* Shadow3
* Outline
* Outline8
* Gradient vertex color
* Horizontal
* Vertical
* Angle
* Diagonal
#### And, more features!
* Animation
![1 -06-2018 01-21-15](https://user-images.githubusercontent.com/12690315/34617750-cf2c9464-f27f-11e7-8ee9-e6be3b209943.gif)
* Use for transition
* Control effect parameter with Animation
![image](https://user-images.githubusercontent.com/12690315/34617750-cf2c9464-f27f-11e7-8ee9-e6be3b209943.gif)
* Use for screen transition
![image](https://user-images.githubusercontent.com/12690315/34618554-71a32e40-f282-11e7-8b78-6948c50c6b58.gif)
* Multiple shadow effect to reduce rendering vertices
![image](https://user-images.githubusercontent.com/12690315/34552373-600fdab2-f164-11e7-8565-21c15af92a93.png)
@@ -33,6 +42,9 @@ Easy to use effects for uGUI. Supports following effects.
![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif)
* Dialog with captured image effect
![image](https://user-images.githubusercontent.com/12690315/34619468-97e3c134-f285-11e7-90b2-3a75bde13911.gif)
* Change vertex color as gradient, with rotation, offset, color correction
![image](https://user-images.githubusercontent.com/12690315/34931353-b1824df2-fa11-11e7-9dda-18aba10a8607.gif)
![image](https://user-images.githubusercontent.com/12690315/34930676-000c41d4-fa0e-11e7-825b-d5a1e757fea8.png)
@@ -47,7 +59,7 @@ Easy to use effects for uGUI. Supports following effects.
## Usage
1. Download [UIEffect.unitypackage](https://github.com/mob-sakai/UIEffect/raw/master/UIEffect.unitypackage) and install to your project.
1. Download UIEffect.unitypackage from [Releases](https://github.com/mob-sakai/UIEffect/releases) and install to your project.
1. Import the package into your Unity project. Select `Import Package > Custom Package` from the `Assets` menu.
1. Add `UIEffect` component to UI element (Image, RawImage, Text, etc...) from `Add Component` in inspector.
1. Choose effect type and adjust values in inspector.
@@ -56,12 +68,13 @@ Easy to use effects for uGUI. Supports following effects.
## Development Note
## UIEffect for CapturedImage
### How does UIEffectCapturedImage work?
![image](https://user-images.githubusercontent.com/12690315/34619147-868cb36a-f284-11e7-8122-b924ff09077f.gif)
`UIEffectCapturedImage` is like post effects, but it only provides effects on the rendered result (= captured image) of a frame.
`UIEffectCapturedImage` is similar to post effect, but uses `CommandBuffer` to give effect only on the rendering result (= captured image) of a specific frame.
This effect is non-realtime, light-weight, less-camera, blit only once, but effective.
* Camera for processing effect is unnecessary.
@@ -74,6 +87,32 @@ See also [WebGL Demo](https://developer.cloud.unity3d.com/share/WyQetw3p-X/webgl
## Why is UIEffect lightweight?
* UIEffect pre-generates material from a combination of effects. This has the following benefits.
* Draw call batching If possible, draw calls will decrease.
* Since only the required material and shader variants are included in the build, the build size will be smaller.
## How to control effect parameters for uGUI element WITHOUT MaterialPropertyBlock?
* In general, you can use [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) for renderers to control minor changes in the material without different batches.
* However, changing the [MaterialPropertyBlock](https://docs.unity3d.com/ScriptReference/MaterialPropertyBlock.html) of the uGUI element from the script will cause different batches and draw calls to increase.
* So UIEffect encodes multiple effect parameters to UV1 channel with [IMeshModifier](https://docs.unity3d.com/ScriptReference/UI.IMeshModifier.html).
* Up to four [0-1] parameters are packed in one float.
* 6 bit has 64 steps and 12 bit has 4096 steps.
* Effect parameters are low precision, but sufficient.
| uv1 | - | - | - | - |
|-|-|-|-|-|
| x(32bit float) | Tone[0-1] (6bit) | Empty (6bit) | Blur[0-1] (12bit) | - |
| y(32bit float) | Red[0-1] (6bit) | Green[0-1] (6bit) | Blue[0-1] (6bit) | Alpha[0-1] (6bit) |
## Note: Unity 5.6+
In Unity 5.6+, Canvas supports **Additional Shader Channels**.
@@ -86,7 +125,7 @@ Please enable `TexCoord1` to use UIEffect.
## Demo
[WebGL Demo](https://developer.cloud.unity3d.com/share/WyQetw3p-X/webgl/)
[WebGL Demo](https://developer.cloud.unity3d.com/share/WJTY06hfG7/webgl/)
* Effect sample
* Transition
@@ -98,6 +137,31 @@ Please enable `TexCoord1` to use UIEffect.
## Release Notes
### ver.1.5.0
* Feature: Add ToneMode `Hue Shift`.
![image](https://user-images.githubusercontent.com/12690315/34830409-18114e44-f727-11e7-849a-0d61a35f03ea.png)
* Feature: Add ShadowMode `Shadow3`.
![image](https://user-images.githubusercontent.com/12690315/34930812-cb87dc24-fa0e-11e7-90a7-0013e2ba55d1.png)
* Feature: Add `UIGradient` component to change vertex color as gradient.
* Gradient direction
* Horizontal
* Vertical
* Angle
* Diagonal
* Rotation and offset
* Text gradient style
* Rect
* Fit
* Split
* Color space
* Uninitialized
* Gammma
* Linear
* Ignore aspect ratio
![image](https://user-images.githubusercontent.com/12690315/34930676-000c41d4-fa0e-11e7-825b-d5a1e757fea8.png)
### ver.1.4.4
* Fixed: Error has occur on edit prefab. [#27](https://github.com/mob-sakai/UIEffect/issues/27)
@@ -109,7 +173,7 @@ Please enable `TexCoord1` to use UIEffect.
### ver.1.4.2
* Fixed: Error has occur on after deserialize. [#16](https://github.com/mob-sakai/UIEffect/issues/16)
@@ -130,8 +194,8 @@ Build report of demo project is as following.
|--|-----------|-----------|
| UI-Effect.shader | All 112 variants, 170.7 kb | 21 variants, 31.4 kb |
| UI-EffectCapturedImage.shader | All 80 variants, 49.0 kb | 2 variants, 7.3 kb |
| Materials in build | Instantiate on play, 0 kb | 23 items, about 5.0 kb |
| Total | 219.7 kb | 43.7 kb |
| Materials in build | Instantiate on play, 0 kb | 23 items, about 6.9 kb |
| Total | 219.7 kb | 45.6 kb |
### ver.1.3.0
@@ -205,4 +269,6 @@ Build report of demo project is as following.
## See Also
* GitHub Page : https://github.com/mob-sakai/UIEffect
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
* Releases : https://github.com/mob-sakai/UIEffect/releases
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
* Current Project : https://github.com/mob-sakai/UIEffect/projects/1
+19 -1
View File
@@ -6,7 +6,7 @@
//################################
#define PACKER_STEP 64
#if UI_TONE_GRAYSCALE | UI_TONE_SEPIA | UI_TONE_NEGA | UI_TONE_PIXEL | UI_TONE_MONO | UI_TONE_CUTOFF
#if UI_TONE_GRAYSCALE | UI_TONE_SEPIA | UI_TONE_NEGA | UI_TONE_PIXEL | UI_TONE_MONO | UI_TONE_CUTOFF | UI_TONE_HUE
#define UI_TONE
#endif
@@ -116,6 +116,24 @@ fixed4 Tex2DBlurring(sampler2D tex, half2 uv, half blur)
//################################
// Tone effect
//################################
fixed3 shift_hue(fixed3 RGB, half VSU, half VSW)
{
fixed3 RESULT;
RESULT.x = (0.299 + 0.701*VSU + 0.168*VSW)*RGB.x
+ (0.587 - 0.587*VSU + 0.330*VSW)*RGB.y
+ (0.114 - 0.114*VSU - 0.497*VSW)*RGB.z;
RESULT.y = (0.299 - 0.299*VSU - 0.328*VSW)*RGB.x
+ (0.587 + 0.413*VSU + 0.035*VSW)*RGB.y
+ (0.114 - 0.114*VSU + 0.292*VSW)*RGB.z;
RESULT.z = (0.299 - 0.3*VSU + 1.25*VSW)*RGB.x
+ (0.587 - 0.588*VSU - 1.05*VSW)*RGB.y
+ (0.114 + 0.886*VSU - 0.203*VSW)*RGB.z;
return (RESULT);
}
// Apply tone effect.
fixed4 ApplyToneEffect(fixed4 color, fixed factor)
{
+10 -3
View File
@@ -60,7 +60,7 @@ Shader "UI/Hidden/UI-Effect"
#pragma multi_compile __ UNITY_UI_ALPHACLIP
// vvvv [For UIEffect] vvvv : Define keyword and include.
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL UI_TONE_MONO UI_TONE_CUTOFF
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL UI_TONE_MONO UI_TONE_CUTOFF UI_TONE_HUE
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
#pragma shader_feature __ UI_BLUR_FAST UI_BLUR_MEDIUM UI_BLUR_DETAIL
#include "UI-Effect.cginc"
@@ -130,7 +130,12 @@ Shader "UI/Hidden/UI-Effect"
// vvvv [For UIEffect] vvvv : Calculate effect parameter.
#if defined (UI_TONE) || defined (UI_BLUR)
OUT.effectFactor = UnpackToVec3(IN.uv1.x);
OUT.effectFactor.y = OUT.effectFactor.z / 4;
#if UI_TONE_HUE
OUT.effectFactor.y = sin(OUT.effectFactor.x*3.14159265359*2);
OUT.effectFactor.x = cos(OUT.effectFactor.x*3.14159265359*2);
#endif
OUT.effectFactor.z = OUT.effectFactor.z / 4;
#endif
#if defined (UI_COLOR)
@@ -151,7 +156,7 @@ Shader "UI/Hidden/UI-Effect"
#endif
#if defined (UI_BLUR)
half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, IN.effectFactor.y) + _TextureSampleAdd) * IN.color;
half4 color = (Tex2DBlurring(_MainTex, IN.texcoord, IN.effectFactor.z) + _TextureSampleAdd) * IN.color;
#else
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
#endif
@@ -166,6 +171,8 @@ Shader "UI/Hidden/UI-Effect"
#if UI_TONE_MONO
color.rgb = IN.color.rgb;
color.a = color.a * tex2D(_MainTex, IN.texcoord).a + IN.effectFactor.x * 2 - 1;
#elif UI_TONE_HUE
color.rgb = shift_hue(color.rgb, IN.effectFactor.x, IN.effectFactor.y);
#elif defined (UI_TONE) & !UI_TONE_CUTOFF
color = ApplyToneEffect(color, IN.effectFactor.x); // Tone effect.
#endif
+7 -5
View File
@@ -26,7 +26,7 @@ Shader "UI/Hidden/UI-EffectCapture"
#include "UnityCG.cginc"
// vvvv [For UIEffect] vvvv : Define keyword and include.
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL
#pragma shader_feature __ UI_TONE_GRAYSCALE UI_TONE_SEPIA UI_TONE_NEGA UI_TONE_PIXEL UI_TONE_HUE
#pragma shader_feature __ UI_COLOR_ADD UI_COLOR_SUB UI_COLOR_SET
#pragma shader_feature __ UI_BLUR_FAST UI_BLUR_MEDIUM UI_BLUR_DETAIL
#include "UI-Effect.cginc"
@@ -47,7 +47,7 @@ Shader "UI/Hidden/UI-EffectCapture"
}
sampler2D _MainTex;
half2 _EffectFactor;
half3 _EffectFactor;
fixed4 _ColorFactor;
fixed4 frag(v2f_img IN) : SV_Target
@@ -58,12 +58,14 @@ Shader "UI/Hidden/UI-EffectCapture"
#endif
#if defined (UI_BLUR)
half4 color = Tex2DBlurring(_MainTex, IN.uv, _EffectFactor.y);
half4 color = Tex2DBlurring(_MainTex, IN.uv, _EffectFactor.z);
#else
half4 color = tex2D(_MainTex, IN.uv);
#endif
#if defined (UI_TONE)
#if UI_TONE_HUE
color.rgb = shift_hue(color.rgb, _EffectFactor.x, _EffectFactor.y);
#elif defined (UI_TONE)
color = ApplyToneEffect(color, _EffectFactor.x); // Tone effect.
#endif
+14 -2
View File
@@ -71,6 +71,7 @@ namespace UnityEngine.UI
Pixel,
Mono,
Cutoff,
Hue,
}
/// <summary>
@@ -93,6 +94,7 @@ namespace UnityEngine.UI
Shadow,
Outline,
Outline8,
Shadow3,
}
/// <summary>
@@ -382,8 +384,15 @@ namespace UnityEngine.UI
// Append Shadow.
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
// Append Shadow3.
if (ShadowMode.Shadow3 == mode)
{
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, 0, effectDistance.y, factor, color, useGraphicAlpha);
}
// Append Outline.
if (ShadowMode.Outline <= mode)
else if (ShadowMode.Outline == mode)
{
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
@@ -391,8 +400,11 @@ namespace UnityEngine.UI
}
// Append Outline8.
if (ShadowMode.Outline8 <= mode)
else if (ShadowMode.Outline8 == mode)
{
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, effectDistance.y, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, -effectDistance.y, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, -effectDistance.x, 0, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, 0, -effectDistance.y, factor, color, useGraphicAlpha);
ApplyShadowZeroAlloc(s_Verts, ref start, ref end, effectDistance.x, 0, factor, color, useGraphicAlpha);
+5 -1
View File
@@ -183,7 +183,11 @@ namespace UnityEngine.UI
_buffer.Blit(BuiltinRenderTextureType.CurrentActive, s_CopyId);
// Set properties.
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, blur / w));
if(toneMode == UIEffect.ToneMode.Hue)
_buffer.SetGlobalVector("_EffectFactor", new Vector4(Mathf.Cos(toneLevel* Mathf.PI * 2), Mathf.Sin(toneLevel * Mathf.PI * 2), blur / w));
else
_buffer.SetGlobalVector("_EffectFactor", new Vector4(toneLevel, 0, blur / w));
_buffer.SetGlobalVector("_ColorFactor", new Vector4(effectColor.r, effectColor.g, effectColor.b, effectColor.a));
// Blit without effect.
+239
View File
@@ -0,0 +1,239 @@
using UnityEngine;
using UnityEngine.UI;
namespace UnityEngine.UI
{
/// <summary>
/// UIGradient.
/// </summary>
[DisallowMultipleComponent]
public class UIGradient : BaseMeshEffect
{
//################################
// Constant or Static Members.
//################################
static readonly Vector2[] s_SplitedCharacterPosition = { Vector2.up, Vector2.one, Vector2.right, Vector2.zero };
/// <summary>
/// Gradient direction.
/// </summary>
public enum Direction
{
Horizontal,
Vertical,
Angle,
Diagonal,
}
/// <summary>
/// Gradient space for Text.
/// </summary>
public enum GradientStyle
{
Rect,
Fit,
Split,
}
//################################
// Serialize Members.
//################################
[SerializeField] Direction m_Direction;
[SerializeField] Color m_Color1 = Color.white;
[SerializeField] Color m_Color2 = Color.white;
[SerializeField] Color m_Color3 = Color.white;
[SerializeField] Color m_Color4 = Color.white;
[SerializeField][Range(-180, 180)] float m_Rotation;
[SerializeField][Range(-1, 1)] float m_Offset1;
[SerializeField][Range(-1, 1)] float m_Offset2;
[SerializeField] GradientStyle m_GradientStyle;
[SerializeField] ColorSpace m_ColorSpace = ColorSpace.Uninitialized;
[SerializeField] bool m_IgnoreAspectRatio = true;
//################################
// Public Members.
//################################
new public Graphic graphic { get { return base.graphic; } }
/// <summary>
/// Gradient Direction.
/// </summary>
public Direction direction { get { return m_Direction; } set { if (m_Direction != value) { m_Direction = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Color1: Top or Left.
/// </summary>
public Color color1 { get { return m_Color1; } set { if (m_Color1 != value) { m_Color1 = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Color2: Bottom or Right.
/// </summary>
public Color color2 { get { return m_Color2; } set { if (m_Color2 != value) { m_Color2 = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Color3: For diagonal.
/// </summary>
public Color color3 { get { return m_Color3; } set { if (m_Color3 != value) { m_Color3 = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Color4: For diagonal.
/// </summary>
public Color color4 { get { return m_Color4; } set { if (m_Color4 != value) { m_Color4 = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Gradient rotation.
/// </summary>
public float rotation
{
get
{
return m_Direction == Direction.Horizontal ? -90
: m_Direction == Direction.Vertical ? 0
: m_Rotation;
}
set { if (m_Rotation != value) { m_Rotation = value; graphic.SetVerticesDirty(); } }
}
/// <summary>
/// Gradient offset for Horizontal, Vertical or Angle.
/// </summary>
public float offset { get { return m_Offset1; } set { if (m_Offset1 != value) { m_Offset1 = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Gradient offset for Diagonal.
/// </summary>
public Vector2 offset2 { get { return new Vector2(m_Offset2, m_Offset1); } set { if (m_Offset1 != value.y || m_Offset2 != value.x) { m_Offset1 = value.y; m_Offset2 = value.x; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Gradient style for Text.
/// </summary>
public GradientStyle gradientStyle { get { return m_GradientStyle; } set { if (m_GradientStyle != value) { m_GradientStyle = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Color space to correct color.
/// </summary>
public ColorSpace colorSpace { get { return m_ColorSpace; } set { if (m_ColorSpace != value) { m_ColorSpace = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Ignore aspect ratio.
/// </summary>
public bool ignoreAspectRatio { get { return m_IgnoreAspectRatio; } set { if (m_IgnoreAspectRatio != value) { m_IgnoreAspectRatio = value; graphic.SetVerticesDirty(); } } }
/// <summary>
/// Call used to modify mesh.
/// </summary>
public override void ModifyMesh(VertexHelper vh)
{
if (!IsActive())
return;
// Gradient space.
Rect rect = default(Rect);
UIVertex vertex = default(UIVertex);
if (!(graphic is Text) || m_GradientStyle == GradientStyle.Rect)
{
// RectTransform.
rect = graphic.rectTransform.rect;
}
else if (m_GradientStyle == GradientStyle.Split)
{
// Each characters.
rect.Set(0, 0, 1, 1);
}
else if (m_GradientStyle == GradientStyle.Fit)
{
// Fit to contents.
rect.xMin = rect.yMin = float.MaxValue;
rect.xMax = rect.yMax = float.MinValue;
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vertex, i);
rect.xMin = Mathf.Min(rect.xMin, vertex.position.x);
rect.yMin = Mathf.Min(rect.yMin, vertex.position.y);
rect.xMax = Mathf.Max(rect.xMax, vertex.position.x);
rect.yMax = Mathf.Max(rect.yMax, vertex.position.y);
}
}
// Gradient rotation.
float rad = rotation * Mathf.Deg2Rad;
Vector2 dir = new Vector2(Mathf.Cos(rad), Mathf.Sin(rad));
if (!m_IgnoreAspectRatio && Direction.Angle <= m_Direction)
{
dir.x *= rect.height / rect.width;
dir = dir.normalized;
}
// Calculate vertex color.
Color color;
Vector2 nomalizedPos;
Matrix2x3 localMatrix = new Matrix2x3(rect, dir.x, dir.y); // Get local matrix.
for (int i = 0; i < vh.currentVertCount; i++)
{
vh.PopulateUIVertex(ref vertex, i);
// Normalize vertex position by local matrix.
if (m_GradientStyle == GradientStyle.Split)
{
// Each characters.
nomalizedPos = localMatrix * s_SplitedCharacterPosition[i % 4] + offset2;
}
else
{
nomalizedPos = localMatrix * vertex.position + offset2;
}
// Interpolate vertex color.
if (direction == Direction.Diagonal)
{
color = Color.LerpUnclamped(
Color.LerpUnclamped(m_Color1, m_Color2, nomalizedPos.x),
Color.LerpUnclamped(m_Color3, m_Color4, nomalizedPos.x),
nomalizedPos.y);
}
else
{
color = Color.LerpUnclamped(m_Color2, m_Color1, nomalizedPos.y);
}
// Correct color.
vertex.color *= (m_ColorSpace == ColorSpace.Gamma) ? color.gamma
: (m_ColorSpace == ColorSpace.Linear) ? color.linear
: color;
vh.SetUIVertex(vertex, i);
}
}
/// <summary>
/// Matrix2x3.
/// </summary>
struct Matrix2x3
{
public float m00, m01, m02, m10, m11, m12;
public Matrix2x3(Rect rect, float cos, float sin)
{
const float center = 0.5f;
float dx = -rect.xMin / rect.width - center;
float dy = -rect.yMin / rect.height - center;
m00 = cos / rect.width;
m01 = -sin / rect.height;
m02 = dx * cos - dy * sin + center;
m10 = sin / rect.width;
m11 = cos / rect.height;
m12 = dx * sin + dy * cos + center;
}
public static Vector2 operator*(Matrix2x3 m, Vector2 v)
{
return new Vector2(
(m.m00 * v.x) + (m.m01 * v.y) + m.m02,
(m.m10 * v.x) + (m.m11 * v.y) + m.m12
);
}
}
}
}
+12
View File
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 3fb48d82dc0e94a2b9246d17d04f8748
timeCreated: 1515744842
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.