// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "GG/NewAdd_02" { Properties { [Enum(Add,1,Blend,10)]_BlendMode("BlendMode", Int) = 1 _MainTextureIntensity("MainTextureIntensity", Float) = 1 [HideInInspector][Enum(UnityEngine.Rendering.BlendMode)]_Src("Src", Int) = 5 _MainColor("MainColor", Color) = (1,1,1,1) _MainTexture("MainTexture", 2D) = "black" {} _Turbulent("Turbulent", 2D) = "black" {} _Turbulent_intensity_Speed("Turbulent_intensity_Speed", Vector) = (0,0,0,0) _Mask("Mask", 2D) = "white" {} _MaskTextureIntensity("MaskTextureIntensity", Float) = 1 _MainAndMask_UVSpeed("MainAndMask_UVSpeed", Vector) = (0,0,0,0) [Toggle]_CustomSteam("CustomSteam", Float) = 0 _StencilComp ("Stencil Comparison", Float) = 8 _Stencil ("Stencil ID", Float) = 0 _StencilOp ("Stencil Operation", Float) = 0 _StencilWriteMask ("Stencil Write Mask", Float) = 255 _StencilReadMask ("Stencil Read Mask", Float) = 255 } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } LOD 100 CGINCLUDE #pragma target 2.0 ENDCG Blend [_Src] [_BlendMode], [_Src] [_BlendMode] AlphaToMask Off Cull Off ColorMask RGB ZWrite Off ZTest LEqual Offset 0 , 0 Stencil { Ref [_Stencil] Comp [_StencilComp] Pass [_StencilOp] ReadMask [_StencilReadMask] WriteMask [_StencilWriteMask] } 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" #include "UnityShaderVariables.cginc" #define ASE_NEEDS_FRAG_COLOR struct appdata { float4 vertex : POSITION; float4 color : COLOR; float4 ase_texcoord : TEXCOORD0; float4 ase_texcoord1 : TEXCOORD1; 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; float4 ase_texcoord2 : TEXCOORD2; float4 ase_color : COLOR; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; uniform int _Src; uniform int _BlendMode; uniform sampler2D _MainTexture; uniform float4 _MainAndMask_UVSpeed; uniform float4 _MainTexture_ST; uniform float4 _Turbulent_intensity_Speed; uniform sampler2D _Turbulent; uniform float4 _Turbulent_ST; uniform float _CustomSteam; uniform float4 _MainColor; uniform float _MainTextureIntensity; uniform float _MaskTextureIntensity; uniform sampler2D _Mask; uniform float4 _Mask_ST; 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 = v.ase_texcoord; o.ase_texcoord2 = v.ase_texcoord1; o.ase_color = v.color; 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 appendResult28 = (float2(_MainAndMask_UVSpeed.x , _MainAndMask_UVSpeed.y)); float2 uv_MainTexture = i.ase_texcoord1.xy * _MainTexture_ST.xy + _MainTexture_ST.zw; float2 appendResult23 = (float2(_Turbulent_intensity_Speed.z , _Turbulent_intensity_Speed.w)); float2 uv_Turbulent = i.ase_texcoord1.xy * _Turbulent_ST.xy + _Turbulent_ST.zw; float2 panner22 = ( 1.0 * _Time.y * appendResult23 + uv_Turbulent); float4 texCoord39 = i.ase_texcoord2; texCoord39.xy = i.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 ); float2 appendResult41 = (float2(texCoord39.x , texCoord39.y)); float CustomSteam33 = _CustomSteam; float2 lerpResult42 = lerp( panner22 , ( panner22 + appendResult41 ) , CustomSteam33); float4 tex2DNode14 = tex2D( _Turbulent, lerpResult42 ); float2 appendResult25 = (float2(( uv_MainTexture.x + ( _Turbulent_intensity_Speed.x * tex2DNode14.r ) ) , ( uv_MainTexture.y + ( _Turbulent_intensity_Speed.y * tex2DNode14.r ) ))); float2 panner27 = ( 1.0 * _Time.y * appendResult28 + appendResult25); float4 texCoord31 = i.ase_texcoord1; texCoord31.xy = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 ); float2 appendResult35 = (float2(texCoord31.z , texCoord31.w)); float2 lerpResult37 = lerp( panner27 , ( appendResult35 + panner27 ) , CustomSteam33); float4 tex2DNode2 = tex2D( _MainTexture, lerpResult37 ); float2 appendResult30 = (float2(_MainAndMask_UVSpeed.z , _MainAndMask_UVSpeed.w)); float2 uv_Mask = i.ase_texcoord1.xy * _Mask_ST.xy + _Mask_ST.zw; float2 panner29 = ( 1.0 * _Time.y * appendResult30 + uv_Mask); float2 appendResult47 = (float2(texCoord39.z , texCoord39.w)); float2 lerpResult46 = lerp( panner29 , ( panner29 + appendResult47 ) , CustomSteam33); float4 appendResult10 = (float4(( (tex2DNode2).rgb * (_MainColor).rgb * (i.ase_color).rgb * _MainTextureIntensity ) , ( i.ase_color.a * tex2DNode2.a * _MainColor.a * ( _MaskTextureIntensity * tex2D( _Mask, lerpResult46 ).r ) ))); finalColor = appendResult10; return finalColor; } ENDCG } } CustomEditor "ASEMaterialInspector" } /*ASEBEGIN Version=18800 1920;135;1906;987;3438.009;475.5248;1;True;True Node;AmplifyShaderEditor.Vector4Node;18;-2424,-399.6627;Inherit;False;Property;_Turbulent_intensity_Speed;Turbulent_intensity_Speed;6;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.TextureCoordinatesNode;21;-2423,-46.5;Inherit;False;0;14;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.TextureCoordinatesNode;39;-2331.876,288.7664;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;32;-1525.008,-902.3646;Inherit;False;Property;_CustomSteam;CustomSteam;10;1;[Toggle];Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;23;-2074,-128.5;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.RegisterLocalVarNode;33;-1288.228,-877.3939;Inherit;False;CustomSteam;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PannerNode;22;-1999,8.5;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;41;-2055.876,193.7664;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.GetLocalVarNode;43;-1772.876,422.7664;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;40;-1854.876,188.7664;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.LerpOp;42;-1705.876,185.7664;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;14;-1722,-39.5;Inherit;True;Property;_Turbulent;Turbulent;5;0;Create;True;0;0;0;False;0;False;-1;None;5fdbd6e17f3e47342a59c5873c99a040;True;0;False;black;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.SimpleMultiplyOpNode;20;-1261,-148.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;17;-1251,-15.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;11;-1589,-416.5;Inherit;False;0;2;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.Vector4Node;26;-1337.457,-612.3857;Inherit;False;Property;_MainAndMask_UVSpeed;MainAndMask_UVSpeed;9;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;15;-1097,-325.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;19;-1081,-219.5;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;25;-882,-330.5;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.DynamicAppendNode;28;-1043,-622.5;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.TextureCoordinatesNode;31;-1859.644,-794.4716;Inherit;False;0;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.DynamicAppendNode;30;-1021.746,-539.2534;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.TextureCoordinatesNode;13;-1205,407.5;Inherit;False;0;12;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.PannerNode;27;-833.6999,-547.0999;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;35;-1546.326,-743.2936;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.PannerNode;29;-864.2017,335.5751;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.DynamicAppendNode;47;-1994.564,646.9069;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.SimpleAddOpNode;36;-598.9277,-648.1938;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;45;-737.6675,827.3689;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode;44;-793.6675,602.3689;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.GetLocalVarNode;38;-688,-256;Inherit;False;33;CustomSteam;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp;37;-624,-446;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.LerpOp;46;-601.6675,597.3689;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.ColorNode;4;-575,147.5;Inherit;False;Property;_MainColor;MainColor;3;0;Create;True;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;12;-441,544.5;Inherit;True;Property;_Mask;Mask;7;0;Create;True;0;0;0;False;0;False;-1;None;5da06e100617f964097099619ec46f21;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.SamplerNode;2;-481.4,-376.1;Inherit;True;Property;_MainTexture;MainTexture;4;0;Create;True;0;0;0;False;0;False;-1;None;7c80b00cfd2e8d04ab335a85e2c1b0fa;True;0;False;black;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.VertexColorNode;5;-20.90234,-434.708;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;50;-400.0035,368.3284;Inherit;False;Property;_MaskTextureIntensity;MaskTextureIntensity;8;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.ComponentMaskNode;48;215.0813,-404.7739;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;49;-571.9187,-31.77393;Inherit;False;Property;_MainTextureIntensity;MainTextureIntensity;1;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.ComponentMaskNode;8;-344,41.5;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;52;-145.0035,430.3284;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ComponentMaskNode;7;-288,-122.5;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;134,-201.5;Inherit;False;4;4;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;32,105.5;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.DynamicAppendNode;10;253,13.5;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 Node;AmplifyShaderEditor.IntNode;54;-2879.328,-89.16498;Inherit;False;Property;_Src;Src;2;2;[HideInInspector];[Enum];Create;True;0;2;Add;5;Blend;5;1;UnityEngine.Rendering.BlendMode;True;0;False;5;5;False;0;1;INT;0 Node;AmplifyShaderEditor.IntNode;55;-2872.801,63.13553;Inherit;False;Property;_BlendMode;BlendMode;0;1;[Enum];Create;True;0;2;Add;1;Blend;10;0;True;0;False;1;0;False;0;1;INT;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;482,-78;Float;False;True;-1;2;ASEMaterialInspector;100;1;NewAdd;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;8;5;True;54;1;True;55;1;0;True;54;0;True;55;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;0;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;23;0;18;3 WireConnection;23;1;18;4 WireConnection;33;0;32;0 WireConnection;22;0;21;0 WireConnection;22;2;23;0 WireConnection;41;0;39;1 WireConnection;41;1;39;2 WireConnection;40;0;22;0 WireConnection;40;1;41;0 WireConnection;42;0;22;0 WireConnection;42;1;40;0 WireConnection;42;2;43;0 WireConnection;14;1;42;0 WireConnection;20;0;18;2 WireConnection;20;1;14;1 WireConnection;17;0;18;1 WireConnection;17;1;14;1 WireConnection;15;0;11;1 WireConnection;15;1;17;0 WireConnection;19;0;11;2 WireConnection;19;1;20;0 WireConnection;25;0;15;0 WireConnection;25;1;19;0 WireConnection;28;0;26;1 WireConnection;28;1;26;2 WireConnection;30;0;26;3 WireConnection;30;1;26;4 WireConnection;27;0;25;0 WireConnection;27;2;28;0 WireConnection;35;0;31;3 WireConnection;35;1;31;4 WireConnection;29;0;13;0 WireConnection;29;2;30;0 WireConnection;47;0;39;3 WireConnection;47;1;39;4 WireConnection;36;0;35;0 WireConnection;36;1;27;0 WireConnection;44;0;29;0 WireConnection;44;1;47;0 WireConnection;37;0;27;0 WireConnection;37;1;36;0 WireConnection;37;2;38;0 WireConnection;46;0;29;0 WireConnection;46;1;44;0 WireConnection;46;2;45;0 WireConnection;12;1;46;0 WireConnection;2;1;37;0 WireConnection;48;0;5;0 WireConnection;8;0;4;0 WireConnection;52;0;50;0 WireConnection;52;1;12;1 WireConnection;7;0;2;0 WireConnection;9;0;7;0 WireConnection;9;1;8;0 WireConnection;9;2;48;0 WireConnection;9;3;49;0 WireConnection;6;0;5;4 WireConnection;6;1;2;4 WireConnection;6;2;4;4 WireConnection;6;3;52;0 WireConnection;10;0;9;0 WireConnection;10;3;6;0 WireConnection;1;0;10;0 ASEEND*/ //CHKSM=7781B77DDA1123111E600F6600ACAC0177928221