Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Made with Amplify Shader Editor
- // Available at the Unity Asset Store - http://u3d.as/y3X
- Shader "Seaweed"
- {
- Properties
- {
- _MainTex("MainTex", 2D) = "white" {}
- _AlphaClip("AlphaClip", Range( 0 , 1)) = 0
- [HDR]_Tint("Tint", Color) = (0,0.7575803,1,0)
- [Enum(UV,0,Vertex,1)]_Mode("Mode", Float) = 0
- _WavePow("WavePow", Float) = 0.1
- _WaveFreq("WaveFreq", Float) = 10
- _WaveSpeed("WaveSpeed", Float) = 1
- }
- SubShader
- {
- Tags { "RenderType"="Opaque" }
- LOD 0
- CGINCLUDE
- #pragma target 3.0
- ENDCG
- Blend Off
- AlphaToMask Off
- Cull Back
- ColorMask RGBA
- ZWrite On
- 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"
- #include "UnityShaderVariables.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 float _Mode;
- uniform float _WavePow;
- uniform float _WaveFreq;
- uniform float _WaveSpeed;
- uniform sampler2D _MainTex;
- uniform float4 _MainTex_ST;
- uniform float4 _Tint;
- uniform float _AlphaClip;
- v2f vert ( appdata v )
- {
- v2f o;
- UNITY_SETUP_INSTANCE_ID(v);
- UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
- UNITY_TRANSFER_INSTANCE_ID(v, o);
- float2 texCoord131 = v.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
- float offset127 = ( _WavePow * sin( ( ( texCoord131.y * _WaveFreq ) + ( _Time.y * _WaveSpeed ) ) ) );
- float3 appendResult129 = (float3(offset127 , 0.0 , 0.0));
- 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 = ( _Mode * appendResult129 );
- #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 texCoord83 = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
- float2 texCoord131 = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
- float offset127 = ( _WavePow * sin( ( ( texCoord131.y * _WaveFreq ) + ( _Time.y * _WaveSpeed ) ) ) );
- float2 appendResult77 = (float2(( texCoord83.x + offset127 ) , texCoord83.y));
- float2 texCoord73 = i.ase_texcoord1.xy * _MainTex_ST.xy + appendResult77;
- float2 offsetUVs120 = texCoord73;
- float2 texCoord122 = i.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
- float2 lerpResult118 = lerp( offsetUVs120 , texCoord122 , _Mode);
- float4 tex2DNode75 = tex2D( _MainTex, lerpResult118 );
- clip( tex2DNode75.a - _AlphaClip);
- finalColor = ( tex2DNode75 * _Tint );
- return finalColor;
- }
- ENDCG
- }
- }
- CustomEditor "ASEMaterialInspector"
- }
- /*ASEBEGIN
- Version=18933
- 3152;181;1601;981;2410.525;-804.446;1;True;False
- Node;AmplifyShaderEditor.SimpleTimeNode;86;-2015.767,1448.807;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
- Node;AmplifyShaderEditor.RangedFloatNode;82;-2042.766,1292.007;Float;False;Property;_WaveFreq;WaveFreq;5;0;Create;True;0;0;0;False;0;False;10;13.99;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.TextureCoordinatesNode;131;-2111.933,1161.14;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.RangedFloatNode;133;-1983.335,1526.739;Inherit;False;Property;_WaveSpeed;WaveSpeed;6;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;84;-1880.167,1240.207;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;132;-1821.335,1457.739;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleAddOpNode;85;-1670.767,1350.808;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.RangedFloatNode;92;-1652.606,1237.862;Float;False;Property;_WavePow;WavePow;4;0;Create;True;0;0;0;False;0;False;0.1;0.5;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SinOpNode;87;-1545.367,1343.007;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;91;-1365.406,1269.062;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.RegisterLocalVarNode;127;-1156.212,1263.87;Inherit;False;offset;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.TextureCoordinatesNode;83;-2109.52,382.4394;Inherit;True;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.GetLocalVarNode;130;-1883.434,489.7401;Inherit;False;127;offset;1;0;OBJECT;;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleAddOpNode;90;-1682.152,415.2448;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
- Node;AmplifyShaderEditor.TexturePropertyNode;74;-1875.761,163.2488;Float;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;None;19493d4b01e9bb24ebe198331d349ca1;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
- Node;AmplifyShaderEditor.TextureTransformNode;72;-1587.083,271.9844;Inherit;False;-1;False;1;0;SAMPLER2D;;False;2;FLOAT2;0;FLOAT2;1
- Node;AmplifyShaderEditor.DynamicAppendNode;77;-1537.365,440.5999;Inherit;True;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
- Node;AmplifyShaderEditor.TextureCoordinatesNode;73;-1287.115,322.5456;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.RegisterLocalVarNode;120;-1058.724,318.4799;Inherit;False;offsetUVs;-1;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0
- Node;AmplifyShaderEditor.RegisterLocalVarNode;125;-1600.762,150.2434;Inherit;False;tex;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
- Node;AmplifyShaderEditor.RangedFloatNode;115;-420.8201,221.5534;Inherit;False;Property;_Mode;Mode;3;1;[Enum];Create;True;0;2;UV;0;Vertex;1;0;False;0;False;0;1;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.TextureCoordinatesNode;122;-515.226,60.41732;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.GetLocalVarNode;121;-470.5206,-41.83761;Inherit;False;120;offsetUVs;1;0;OBJECT;;False;1;FLOAT2;0
- Node;AmplifyShaderEditor.GetLocalVarNode;126;-246.3326,-125.4924;Inherit;False;125;tex;1;0;OBJECT;;False;1;SAMPLER2D;0
- Node;AmplifyShaderEditor.LerpOp;118;-220.8718,-5.008037;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
- Node;AmplifyShaderEditor.ColorNode;67;36.56467,102.119;Float;False;Property;_Tint;Tint;2;1;[HDR];Create;True;0;0;0;False;0;False;0,0.7575803,1,0;0.4247508,0.7830189,0.502615,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
- Node;AmplifyShaderEditor.GetLocalVarNode;128;-0.2017832,313.1494;Inherit;False;127;offset;1;0;OBJECT;;False;1;FLOAT;0
- Node;AmplifyShaderEditor.SamplerNode;75;-49.47306,-83.18158;Inherit;True;Property;_TextureSample0;Texture Sample 0;2;0;Create;True;0;0;0;False;0;False;-1;None;None;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.DynamicAppendNode;129;160.598,312.1494;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
- Node;AmplifyShaderEditor.RangedFloatNode;103;276.1326,152.4478;Inherit;False;Property;_AlphaClip;AlphaClip;1;0;Create;True;0;0;0;False;0;False;0;0.234;0;1;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;281.7648,-88.28107;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
- Node;AmplifyShaderEditor.ClipNode;100;574.4559,32.0785;Inherit;False;3;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;COLOR;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;117;294.5497,250.9735;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
- Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;857.6697,146.2849;Float;False;True;-1;2;ASEMaterialInspector;0;1;Seaweed;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;False;True;0;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;True;0;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;True;True;True;True;True;0;False;-1;False;False;False;False;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;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;RenderType=Opaque=RenderType;True;2;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;True;1;LightMode=ForwardBase;False;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0
- WireConnection;84;0;131;2
- WireConnection;84;1;82;0
- WireConnection;132;0;86;0
- WireConnection;132;1;133;0
- WireConnection;85;0;84;0
- WireConnection;85;1;132;0
- WireConnection;87;0;85;0
- WireConnection;91;0;92;0
- WireConnection;91;1;87;0
- WireConnection;127;0;91;0
- WireConnection;90;0;83;1
- WireConnection;90;1;130;0
- WireConnection;72;0;74;0
- WireConnection;77;0;90;0
- WireConnection;77;1;83;2
- WireConnection;73;0;72;0
- WireConnection;73;1;77;0
- WireConnection;120;0;73;0
- WireConnection;125;0;74;0
- WireConnection;118;0;121;0
- WireConnection;118;1;122;0
- WireConnection;118;2;115;0
- WireConnection;75;0;126;0
- WireConnection;75;1;118;0
- WireConnection;129;0;128;0
- WireConnection;66;0;75;0
- WireConnection;66;1;67;0
- WireConnection;100;0;66;0
- WireConnection;100;1;75;4
- WireConnection;100;2;103;0
- WireConnection;117;0;115;0
- WireConnection;117;1;129;0
- WireConnection;2;0;100;0
- WireConnection;2;1;117;0
- ASEEND*/
- //CHKSM=CA4418A09CD3E6BAB0A5EF35384B855327DCF68C
Add Comment
Please, Sign In to add comment