184 lines
8.0 KiB
Plaintext
184 lines
8.0 KiB
Plaintext
// Made with Amplify Shader Editor
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
|
Shader "X1_UI_FightStart"
|
|
{
|
|
Properties
|
|
{
|
|
_TextureSample0("Texture Sample 0", 2D) = "white" {}
|
|
_cut("cut", Range( -1 , 1)) = 0
|
|
_st("st", Range( 0 , 1)) = 0
|
|
_a(" a", Range( 1 , 30)) = 1
|
|
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
|
|
|
|
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
|
|
LOD 100
|
|
|
|
CGINCLUDE
|
|
#pragma target 3.0
|
|
ENDCG
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
AlphaToMask Off
|
|
Cull Off
|
|
ColorMask RGBA
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
Offset 0 , 0
|
|
|
|
|
|
|
|
Pass
|
|
{
|
|
Name "Unlit"
|
|
Tags { "LightMode"="ForwardBase" }
|
|
CGPROGRAM
|
|
|
|
|
|
|
|
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
|
//only defining to not throw compilation error over Unity 5.5
|
|
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
|
#endif
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_instancing
|
|
#include "UnityCG.cginc"
|
|
|
|
|
|
struct appdata
|
|
{
|
|
float4 vertex : POSITION;
|
|
float4 color : COLOR;
|
|
float4 ase_texcoord : TEXCOORD0;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct v2f
|
|
{
|
|
float4 vertex : SV_POSITION;
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
|
float3 worldPos : TEXCOORD0;
|
|
#endif
|
|
float4 ase_texcoord1 : TEXCOORD1;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
uniform sampler2D _TextureSample0;
|
|
uniform float _a;
|
|
uniform float _st;
|
|
uniform float _cut;
|
|
|
|
|
|
v2f vert ( appdata v )
|
|
{
|
|
v2f o;
|
|
UNITY_SETUP_INSTANCE_ID(v);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
|
|
|
o.ase_texcoord1.xy = v.ase_texcoord.xy;
|
|
|
|
//setting value to unused interpolator channels and avoid initialization warnings
|
|
o.ase_texcoord1.zw = 0;
|
|
float3 vertexValue = float3(0, 0, 0);
|
|
#if ASE_ABSOLUTE_VERTEX_POS
|
|
vertexValue = v.vertex.xyz;
|
|
#endif
|
|
vertexValue = vertexValue;
|
|
#if ASE_ABSOLUTE_VERTEX_POS
|
|
v.vertex.xyz = vertexValue;
|
|
#else
|
|
v.vertex.xyz += vertexValue;
|
|
#endif
|
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
|
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
|
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
|
|
#endif
|
|
return o;
|
|
}
|
|
|
|
fixed4 frag (v2f i ) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(i);
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
|
fixed4 finalColor;
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
|
float3 WorldPosition = i.worldPos;
|
|
#endif
|
|
float2 texCoord2 = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
|
|
float2 texCoord8 = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
|
|
float temp_output_20_0 = (-1.0 + (step( texCoord8.x , texCoord8.y ) - 0.0) * (1.0 - -1.0) / (1.0 - 0.0));
|
|
float2 appendResult23 = (float2(temp_output_20_0 , temp_output_20_0));
|
|
float temp_output_5_0 = (1.0 + (step( ( 1.0 - texCoord8.x ) , texCoord8.y ) - 0.0) * (-1.0 - 1.0) / (1.0 - 0.0));
|
|
float2 appendResult22 = (float2(( temp_output_5_0 * -1.0 ) , temp_output_5_0));
|
|
float2 lerpResult18 = lerp( appendResult23 , appendResult22 , _st);
|
|
|
|
|
|
finalColor = tex2D( _TextureSample0, ( ( ( ( texCoord2 + float2( -0.5,-0.5 ) ) * _a ) + float2( 0.5,0.5 ) ) + ( lerpResult18 * _cut * _a ) ) );
|
|
return finalColor;
|
|
}
|
|
ENDCG
|
|
}
|
|
}
|
|
CustomEditor "ASEMaterialInspector"
|
|
|
|
|
|
}
|
|
/*ASEBEGIN
|
|
Version=18707
|
|
-3;32;1052;462;2269.816;-154.7721;1.269371;True;False
|
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;8;-2725.734,280.9013;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.OneMinusNode;17;-2354.444,347.575;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.StepOpNode;15;-2136.444,428.575;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.TFHCRemapNode;5;-1828.848,409.3976;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;1;False;4;FLOAT;-1;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.StepOpNode;3;-2134.956,188.9054;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.TFHCRemapNode;20;-1862.643,183.7991;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-1;False;4;FLOAT;1;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;21;-1635.317,342.7558;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;-1;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;2;-2358.8,-253.0757;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.DynamicAppendNode;22;-1485.794,359.1143;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode;19;-1618.501,540.7502;Inherit;False;Property;_st;st;2;0;Create;True;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.DynamicAppendNode;23;-1614.77,207.5477;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode;9;-2196.087,-100.9926;Inherit;False;Property;_a; a;3;0;Create;True;0;0;False;0;False;1;4;1;30;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode;11;-2061.304,-249.4133;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;-0.5,-0.5;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.LerpOp;18;-1263.699,271.1308;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;10;-1837.509,-160.7982;Inherit;True;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode;7;-1261.503,522.5012;Inherit;False;Property;_cut;cut;1;0;Create;True;0;0;False;0;False;0;0;-1;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-893.9069,204.5543;Inherit;False;3;3;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode;12;-1601.736,-216.2273;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode;4;-666.6843,-5.686508;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
|
|
Node;AmplifyShaderEditor.SamplerNode;1;-529.7555,-48.37259;Inherit;True;Property;_TextureSample0;Texture Sample 0;0;0;Create;True;0;0;False;0;False;-1;None;1fee434e1021f4b4489af1af5429125b;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;True;-1;2;ASEMaterialInspector;100;1;X1_UI_FightStart;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;2;5;False;-1;10;False;-1;0;1;False;-1;0;False;-1;True;0;False;-1;0;False;-1;False;False;False;False;False;False;True;0;False;-1;True;2;False;-1;True;True;True;True;True;0;False;-1;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;2;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;2;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;True;2;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=ForwardBase;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;1;True;False;;False;0
|
|
WireConnection;17;0;8;1
|
|
WireConnection;15;0;17;0
|
|
WireConnection;15;1;8;2
|
|
WireConnection;5;0;15;0
|
|
WireConnection;3;0;8;1
|
|
WireConnection;3;1;8;2
|
|
WireConnection;20;0;3;0
|
|
WireConnection;21;0;5;0
|
|
WireConnection;22;0;21;0
|
|
WireConnection;22;1;5;0
|
|
WireConnection;23;0;20;0
|
|
WireConnection;23;1;20;0
|
|
WireConnection;11;0;2;0
|
|
WireConnection;18;0;23;0
|
|
WireConnection;18;1;22;0
|
|
WireConnection;18;2;19;0
|
|
WireConnection;10;0;11;0
|
|
WireConnection;10;1;9;0
|
|
WireConnection;6;0;18;0
|
|
WireConnection;6;1;7;0
|
|
WireConnection;6;2;9;0
|
|
WireConnection;12;0;10;0
|
|
WireConnection;4;0;12;0
|
|
WireConnection;4;1;6;0
|
|
WireConnection;1;1;4;0
|
|
WireConnection;0;0;1;0
|
|
ASEEND*/
|
|
//CHKSM=5A2A70114C924C43C4D549214CDF3C04D61C71F7 |