update 0.6.1
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a72833fcf054be4e83325b8149bfe8d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: XUIDotBasic
|
||||
m_Shader: {fileID: 4800000, guid: 858173d3f3725a1468cac9f50da734a4, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Hardness: 0.001
|
||||
- _Keyword0: 0
|
||||
- _Radius: 0.28
|
||||
- _RectSize: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _BackgroundColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27854d851ac720b4db774811988c6b95
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,169 @@
|
||||
|
||||
Shader "XUIDotBasic"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _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
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
_BackgroundColor( "BackgroundColor", Color ) = ( 1, 1, 1, 0 )
|
||||
_Radius( "Radius", Range( 0, 1 ) ) = 0.5
|
||||
_RectSize( "RectSize", Range( 0, 1 ) ) = 1
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
}
|
||||
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19908
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
uniform float4 _BackgroundColor;
|
||||
uniform float _RectSize;
|
||||
uniform float _Radius;
|
||||
|
||||
|
||||
v2f vert(appdata_t v )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
|
||||
|
||||
v.vertex.xyz += float3( 0, 0, 0 ) ;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN ) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float2 texCoord3 = IN.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float temp_output_2_0_g2 = _RectSize;
|
||||
float temp_output_3_0_g2 = _RectSize;
|
||||
float2 appendResult21_g2 = (float2(temp_output_2_0_g2 , temp_output_3_0_g2));
|
||||
float Radius25_g2 = max( min( min( abs( ( _Radius * 2 ) ), abs( temp_output_2_0_g2 ) ), abs( temp_output_3_0_g2 ) ), 1E-05 );
|
||||
float temp_output_30_0_g2 = ( length( max( ( ( abs( (texCoord3*2.0 + -1.0) ) - appendResult21_g2 ) + Radius25_g2 ), 0.0 ) ) / Radius25_g2 );
|
||||
float temp_output_23_0 = saturate( ( ( 1.0 - temp_output_30_0_g2 ) / fwidth( temp_output_30_0_g2 ) ) );
|
||||
float4 lerpResult7 = lerp( _BackgroundColor , IN.color , temp_output_23_0);
|
||||
|
||||
|
||||
half4 color = lerpResult7;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
+2
-70
@@ -1,5 +1,4 @@
|
||||
// Made with Amplify Shader Editor v1.9.9.1
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
|
||||
Shader "XUIBasic"
|
||||
{
|
||||
Properties
|
||||
@@ -222,71 +221,4 @@ Shader "XUIBasic"
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19901
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;-1408,256;Inherit;False;Property;_CoordRotateAngle;CoordRotateAngle;2;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;28;-1920,0;Inherit;False;Property;_CoordTransform;CoordTransform;0;0;Create;True;0;0;0;False;0;False;1,1,0,0;1,1,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;9;-1184,256;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;2;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;30;-1664,96;Inherit;False;False;False;True;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;29;-1664,16;Inherit;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;1;-1408,0;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.PiNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-1024,256;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Vector2Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;-1408,128;Inherit;False;Property;_CoordCenterv2;CoordCenter(v2);1;0;Create;True;0;0;0;False;0;False;0.5,0.5;0.5,0.5;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||||
Node;AmplifyShaderEditor.Vector2Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;34;-768,-128;Inherit;False;Constant;_Vector0;Vector 0;11;0;Create;True;0;0;0;False;0;False;1,1;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||||
Node;AmplifyShaderEditor.RotatorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-896,0;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;-512,0;Inherit;False;PMod;-1;;3;f21979a9080cb044ca372458f5a37d88;1,33,0;2;2;FLOAT2;0,0;False;3;FLOAT2;1,1;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;-480,128;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;26;-256,-128;Inherit;False;Property;_CoordRange;CoordRange;10;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;3;Normal;Mode;ABS;Create;True;True;All;9;1;FLOAT2;0,0;False;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT2;0,0;False;6;FLOAT2;0,0;False;7;FLOAT2;0,0;False;8;FLOAT2;0,0;False;1;FLOAT2;0
|
||||
Node;AmplifyShaderEditor.ComponentMaskNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;0,-128;Inherit;False;True;False;True;True;1;0;FLOAT2;0,0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;0,96;Inherit;False;Property;_ExpNumber;ExpNumber;5;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.SinOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;19;256,-64;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.CosOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;20;256,0;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.PowerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;256,64;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.Vector2Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;25;0,384;Inherit;False;Property;_PolygonSizev2;PolygonSize(v2);9;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||||
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;24;0,288;Inherit;False;Property;_PolygonSides;PolygonSides;8;0;Create;True;0;0;0;False;0;False;5;0;0;0;0;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;256,256;Inherit;False;Polygon;-1;;4;6906ef7087298c94c853d6753e182169;0;4;1;FLOAT2;0,0;False;2;FLOAT;5;False;3;FLOAT;0.5;False;4;FLOAT;0.5;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;512,-128;Inherit;False;Property;_GradientType;GradientType;4;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;4;Linear;Sin;Cos;Exponential;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;11;896,-128;Inherit;False;Property;_ElementType;Element Type;3;0;Create;True;0;0;0;False;0;False;0;0;0;True;;KeywordEnum;2;Gradient;Polygon;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||||
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;15;896,-512;Inherit;False;Property;_ColorA;Color A;6;0;Create;True;0;0;0;False;0;False;0,1,0.07612991,1;0,1,0.07612991,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
||||
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;16;896,-320;Inherit;False;Property;_ColorB;Color B;7;0;Create;True;0;0;0;False;0;False;1,0,0,1;1,0,0,1;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
||||
Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;1152,-384;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;7;1312,-384;Inherit;False;FLOAT4;4;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;1;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;1472,-384;Float;False;True;-1;3;AmplifyShaderEditor.MaterialInspector;0;3;XUIBasic;5056123faa0c79b47ab6ad7e8bf059a4;True;Default;0;0;Default;2;False;True;3;1;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;True;0;True;_ColorMask;False;False;False;False;False;False;False;True;True;0;True;_Stencil;255;True;_StencilReadMask;255;True;_StencilWriteMask;0;True;_StencilComp;0;True;_StencilOp;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;0;True;unity_GUIZTestMode;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;False;0;;0;0;Standard;0;0;1;True;False;;False;0
|
||||
WireConnection;9;0;5;0
|
||||
WireConnection;30;0;28;0
|
||||
WireConnection;29;0;28;0
|
||||
WireConnection;1;0;29;0
|
||||
WireConnection;1;1;30;0
|
||||
WireConnection;8;0;9;0
|
||||
WireConnection;2;0;1;0
|
||||
WireConnection;2;1;4;0
|
||||
WireConnection;2;2;8;0
|
||||
WireConnection;32;2;2;0
|
||||
WireConnection;32;3;34;0
|
||||
WireConnection;36;0;2;0
|
||||
WireConnection;26;1;2;0
|
||||
WireConnection;26;0;32;0
|
||||
WireConnection;26;2;36;0
|
||||
WireConnection;18;0;26;0
|
||||
WireConnection;19;0;18;0
|
||||
WireConnection;20;0;18;0
|
||||
WireConnection;22;0;18;0
|
||||
WireConnection;22;1;23;0
|
||||
WireConnection;10;1;26;0
|
||||
WireConnection;10;2;24;0
|
||||
WireConnection;10;3;25;1
|
||||
WireConnection;10;4;25;2
|
||||
WireConnection;13;1;18;0
|
||||
WireConnection;13;0;19;0
|
||||
WireConnection;13;2;20;0
|
||||
WireConnection;13;3;22;0
|
||||
WireConnection;11;1;13;0
|
||||
WireConnection;11;0;10;0
|
||||
WireConnection;14;0;15;0
|
||||
WireConnection;14;1;16;0
|
||||
WireConnection;14;2;11;0
|
||||
WireConnection;7;0;14;0
|
||||
WireConnection;0;0;7;0
|
||||
ASEEND*/
|
||||
//CHKSM=EF1BCF878CBE9DBF87503B5564BA985D4602AE12
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df25563ae0441ef41b5b4c5b02eb44e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UICurve
|
||||
m_Shader: {fileID: 4800000, guid: ed13c09bee4e83848ad102719497b140, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _COLORMODE_SPHERE
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Colormode: 1
|
||||
- _EdgeExp: 0.001
|
||||
- _EdgeStep: 0
|
||||
- _EdgeStepRange: 0.1
|
||||
- _Float0: 0.9
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dd17cf52efd94849995132ec6a6854c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UILineRender
|
||||
m_Shader: {fileID: 4800000, guid: 753025f901250db45b87f87c632c0bb0, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _ColorMask: 15
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fd93918d0371ef419caaf4d889b9e8f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,55 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIPattern
|
||||
m_Shader: {fileID: 4800000, guid: f4e5237cd89192c4f8361db3dec5cc3b, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BackGroundColorAlpha: 0
|
||||
- _BorderColorAlpha: 1
|
||||
- _BorderExp: 0.001
|
||||
- _BorderThinkness: 1
|
||||
- _ColorMask: 15
|
||||
- _ContentExp: 0.001
|
||||
- _ContentThinkness: 1
|
||||
- _Exp: 1
|
||||
- _Exp1: 0.001
|
||||
- _Fill: -0.51
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _Thinkness: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BorderColor2: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FillColor: {r: 0.6698113, g: 0.6698113, b: 0.6698113, a: 0.7803922}
|
||||
- _InlineBorderColor2: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 546be89eca1f2ec42a5eb603594282c0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,167 @@
|
||||
|
||||
Shader "XericLibrary/UIGraph/XericUICurve"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _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
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
_EdgeExp( "Edge Exp", Range( 0.001, 1 ) ) = 0.8671591
|
||||
_EdgeStep( "Edge Step", Range( 0, 1 ) ) = 0
|
||||
_EdgeStepRange( "Edge Step Range", Range( 0, 0.5 ) ) = 0.1
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
}
|
||||
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19908
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES2
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 ase_texcoord2 : TEXCOORD2;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 ase_texcoord3 : TEXCOORD3;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
uniform float _EdgeStep;
|
||||
uniform float _EdgeStepRange;
|
||||
uniform float _EdgeExp;
|
||||
|
||||
|
||||
v2f vert(appdata_t v )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
OUT.ase_texcoord3 = v.ase_texcoord2;
|
||||
|
||||
v.vertex.xyz += float3( 0, 0, 0 ) ;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN ) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float2 texCoord1 = IN.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float smoothstepResult24 = smoothstep( ( _EdgeStep - ( _EdgeStepRange * 2.0 ) ) , ( _EdgeStep + _EdgeStepRange ) , sin( ( texCoord1.x * UNITY_PI ) ));
|
||||
float4 texCoord8 = IN.ase_texcoord3;
|
||||
texCoord8.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float4 lerpResult19 = lerp( IN.color , ( IN.color * pow( saturate( smoothstepResult24 ) , _EdgeExp ) ) , texCoord8.x);
|
||||
|
||||
|
||||
half4 color = lerpResult19;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed13c09bee4e83848ad102719497b140
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+10
-16
@@ -1,6 +1,5 @@
|
||||
// Made with Amplify Shader Editor v1.9.9.1
|
||||
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||||
Shader "XUIDotBasic"
|
||||
|
||||
Shader "XericLibrary/UIGraph/UILineRender"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
@@ -48,7 +47,7 @@ Shader "XUIDotBasic"
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19901
|
||||
#define ASE_VERSION 19908
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
@@ -60,7 +59,9 @@ Shader "XUIDotBasic"
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
||||
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
@@ -127,10 +128,11 @@ Shader "XUIDotBasic"
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float4 appendResult2 = (float4(0.0 , 0.0 , 0.0 , 1.0));
|
||||
float2 texCoord1 = IN.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float4 appendResult3 = (float4(texCoord1 , 0.0 , 1.0));
|
||||
|
||||
|
||||
half4 color = appendResult2;
|
||||
half4 color = appendResult3;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
@@ -151,12 +153,4 @@ Shader "XUIDotBasic"
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
/*ASEBEGIN
|
||||
Version=19901
|
||||
Node;AmplifyShaderEditor.DynamicAppendNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-256,0;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;1;False;1;FLOAT4;0
|
||||
Node;AmplifyShaderEditor.TextureCoordinatesNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;-1024,-128;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||||
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;0,0;Float;False;True;-1;3;AmplifyShaderEditor.MaterialInspector;0;3;XUIDotBasic;5056123faa0c79b47ab6ad7e8bf059a4;True;Default;0;0;Default;2;False;True;3;1;False;;10;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;True;True;True;True;True;0;True;_ColorMask;False;False;False;False;False;False;False;True;True;0;True;_Stencil;255;True;_StencilReadMask;255;True;_StencilWriteMask;0;True;_StencilComp;0;True;_StencilOp;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;0;True;unity_GUIZTestMode;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;False;0;;0;0;Standard;0;0;1;True;False;;False;0
|
||||
WireConnection;0;0;2;0
|
||||
ASEEND*/
|
||||
//CHKSM=2D7C452CAA9F9AC9B28539E122A9F5072E3B0DC3
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dacf142d8c5aee44bbbd2bd080fa3f5
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,192 @@
|
||||
|
||||
Shader "XericLibrary/UIGraph/UIPattern"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _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
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
|
||||
_BorderColorAlpha( "BorderColorAlpha", Range( -0.1, 1 ) ) = 1
|
||||
_BorderThinkness( "Border Thinkness", Range( 0.001, 1 ) ) = 1
|
||||
_BorderExp( "Border Exp", Range( 0.001, 1 ) ) = 0.001
|
||||
_BackGroundColorAlpha( "BackGroundColorAlpha", Range( -0.1, 1 ) ) = 0
|
||||
_ContentThinkness( "Content Thinkness", Range( 0.001, 1 ) ) = 1
|
||||
_ContentExp( "Content Exp", Range( 0.001, 1 ) ) = 0.001
|
||||
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
}
|
||||
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#define ASE_VERSION 19908
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
#define ASE_NEEDS_FRAG_NORMAL
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_TEXTURE_COORDINATES2
|
||||
#define ASE_NEEDS_FRAG_TANGENT
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float3 ase_normal : NORMAL;
|
||||
float4 ase_texcoord2 : TEXCOORD2;
|
||||
float4 ase_tangent : TANGENT;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float3 ase_normal : NORMAL;
|
||||
float4 ase_texcoord3 : TEXCOORD3;
|
||||
float4 ase_tangent : TANGENT;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
uniform float _BackGroundColorAlpha;
|
||||
uniform float _ContentThinkness;
|
||||
uniform float _ContentExp;
|
||||
uniform float _BorderColorAlpha;
|
||||
uniform float _BorderThinkness;
|
||||
uniform float _BorderExp;
|
||||
|
||||
|
||||
v2f vert(appdata_t v )
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
OUT.ase_normal = v.ase_normal;
|
||||
OUT.ase_texcoord3.xy = v.ase_texcoord2.xy;
|
||||
OUT.ase_tangent = v.ase_tangent;
|
||||
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
OUT.ase_texcoord3.zw = 0;
|
||||
|
||||
v.vertex.xyz += float3( 0, 0, 0 ) ;
|
||||
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(1, 1) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (v.vertex.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
OUT.texcoord = v.texcoord;
|
||||
OUT.mask = float4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN ) : SV_Target
|
||||
{
|
||||
//Round up the alpha color coming from the interpolator (to 1.0/256.0 steps)
|
||||
//The incoming alpha could have numerical instability, which makes it very sensible to
|
||||
//HDR color transparency blend, when it blends with the world's texture.
|
||||
const half alphaPrecision = half(0xff);
|
||||
const half invAlphaPrecision = half(1.0/alphaPrecision);
|
||||
IN.color.a = round(IN.color.a * alphaPrecision)*invAlphaPrecision;
|
||||
|
||||
float4 appendResult60 = (float4(IN.ase_normal , saturate( max( max( IN.ase_normal.x, IN.ase_normal.y ), IN.ase_normal.z ) )));
|
||||
float4 appendResult43 = (float4(IN.ase_normal , _BackGroundColorAlpha));
|
||||
float4 lerpResult50 = lerp( appendResult60 , appendResult43 , saturate( sign( ( _BackGroundColorAlpha + 0.001 ) ) ));
|
||||
float4 Background_Color39 = lerpResult50;
|
||||
float4 Center_Color40 = IN.color;
|
||||
float2 texCoord4 = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
|
||||
float lerpResult107 = lerp( texCoord4.x , 0.0 , texCoord4.y);
|
||||
float4 lerpResult64 = lerp( Background_Color39 , Center_Color40 , pow( ( ( _ContentThinkness - lerpResult107 ) / _ContentThinkness ) , _ContentExp ));
|
||||
float4 appendResult57 = (float4(IN.ase_tangent.xyz , saturate( max( max( IN.ase_tangent.xyz.x, IN.ase_tangent.xyz.y ), IN.ase_tangent.xyz.z ) )));
|
||||
float4 appendResult44 = (float4(IN.ase_tangent.xyz , _BorderColorAlpha));
|
||||
float4 lerpResult51 = lerp( appendResult57 , appendResult44 , saturate( sign( ( _BorderColorAlpha + 0.001 ) ) ));
|
||||
float4 Border_Color41 = lerpResult51;
|
||||
float lerpResult108 = lerp( 0.0 , texCoord4.x , texCoord4.y);
|
||||
float4 lerpResult82 = lerp( Background_Color39 , Border_Color41 , pow( ( ( _BorderThinkness - lerpResult108 ) / _BorderThinkness ) , _BorderExp ));
|
||||
float4 lerpResult109 = lerp( lerpResult64 , lerpResult82 , texCoord4.y);
|
||||
|
||||
|
||||
half4 color = lerpResult109;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color.a *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
color.rgb *= color.a;
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
CustomEditor "AmplifyShaderEditor.MaterialInspector"
|
||||
|
||||
Fallback Off
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4e5237cd89192c4f8361db3dec5cc3b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user