// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X 
Shader "Custom/Tree-Standard"
{
	Properties
	{
		_Cutoff( "Mask Clip Value", Float ) = 0.33
		[NoScaleOffset]_MainTex("MainTex", 2D) = "gray" {}
		_Color("Color", Color) = (1,1,1,0)
		_VertexAOIntensity("Vertex AO Intensity", Range( 0 , 1)) = 0
		_VertexAOPower("Vertex AO Power", Float) = 1
		_BendAmount("Bend Amount", Range( 0 , 1)) = 0.05
		_TimeScale("Time Scale", Range( 0.1 , 3)) = 1
		[HideInInspector] _texcoord( "", 2D ) = "white" {}
		[HideInInspector] __dirty( "", Int ) = 1
	}

	SubShader
	{
		Tags{ "RenderType" = "TransparentCutout"  "Queue" = "Transparent+0" "DisableBatching" = "True" }
		Cull Off
		Blend SrcAlpha OneMinusSrcAlpha
		
		CGPROGRAM
		#include "UnityShaderVariables.cginc"
		#pragma target 5.0
		#pragma multi_compile_instancing
		#pragma instancing_options procedural:setup
		#pragma multi_compile GPU_FRUSTUM_ON __
		#include "VS_indirect.cginc"
		#pragma surface surf Lambert keepalpha addshadow fullforwardshadows vertex:vertexDataFunc 
		struct Input
		{
			float3 worldPos;
			float4 vertexColor : COLOR;
			float2 uv_texcoord;
		};

		uniform float _TimeScale;
		uniform float _VertexAOPower;
		uniform float _BendAmount;
		uniform float _VertexAOIntensity;
		uniform sampler2D _MainTex;
		uniform float4 _Color;
		uniform float _Cutoff = 0.33;

		void vertexDataFunc( inout appdata_full v, out Input o )
		{
			UNITY_INITIALIZE_OUTPUT( Input, o );
			float3 ase_vertex3Pos = v.vertex.xyz;
			float3 ase_worldPos = mul( unity_ObjectToWorld, v.vertex );
			float clampResult330 = clamp( pow( v.color.r , _VertexAOPower ) , 0.0 , 1.0 );
			half vmask369 = clampResult330;
			float offset366 = ( ( ( ase_vertex3Pos.y * cos( ( ( ase_worldPos.x + ase_worldPos.z ) + ( ( _Time.y * _TimeScale ) / 3.0 ) ) ) ) * vmask369 ) * _BendAmount );
			float3 temp_cast_0 = (offset366).xxx;
			v.vertex.xyz += temp_cast_0;
		}

		void surf( Input i , inout SurfaceOutput o )
		{
			float clampResult330 = clamp( pow( i.vertexColor.r , _VertexAOPower ) , 0.0 , 1.0 );
			float lerpResult311 = lerp( clampResult330 , 1.0 , ( 1.0 - _VertexAOIntensity ));
			float2 uv_MainTex76 = i.uv_texcoord;
			float4 tex2DNode76 = tex2D( _MainTex, uv_MainTex76 );
			o.Albedo = ( lerpResult311 * (( tex2DNode76 * _Color )).rgb );
			o.Alpha = 1;
			clip( tex2DNode76.a - _Cutoff );
		}

		ENDCG
	}
	Fallback "Diffuse"
	CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=16100
7;7;1906;1014;-1213.2;356.4698;1.880617;True;False
Node;AmplifyShaderEditor.CommentaryNode;355;1512.488,-613.6288;Float;False;2786.933;782.1882;Wind;15;373;372;343;371;366;368;347;367;345;370;344;333;341;350;338;Wind;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode;323;1732.52,435.2302;Float;False;2141.272;1198.658;Color;15;312;256;235;73;76;310;311;313;328;330;331;309;369;365;0;Base Color;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;373;1486.889,-105.8274;Float;False;Property;_TimeScale;Time Scale;6;0;Create;True;0;0;False;0;1;1;0.1;3;0;1;FLOAT;0
Node;AmplifyShaderEditor.TimeNode;343;1539.487,-269.6289;Float;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;328;1999.735,767.3707;Float;False;Property;_VertexAOPower;Vertex AO Power;4;0;Create;True;0;0;False;0;1;1;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.VertexColorNode;309;1801.823,835.6121;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;372;1807.889,-254.8274;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.WorldPosInputsNode;338;1641.488,-563.6288;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.PowerNode;331;2259.951,770.5709;Float;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleDivideOpNode;371;1952.755,-256.3048;Float;False;2;0;FLOAT;0;False;1;FLOAT;3;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleAddOpNode;350;1894.168,-494.4118;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ClampOpNode;330;2572.421,686.3197;Float;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleAddOpNode;341;2165.86,-295.1577;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.CosOpNode;344;2413.86,-148.1577;Float;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;369;2978.981,832.1345;Half;False;vmask;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.PosVertexDataNode;333;2295.077,-473.1576;Float;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;345;2634.859,-173.1577;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.GetLocalVarNode;370;2601.979,64.93509;Float;False;369;vmask;1;0;OBJECT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode;73;1749.965,681.9589;Float;False;Property;_Color;Color;2;0;Create;True;0;0;False;0;1,1,1,0;0.7793103,1,0.75,1;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;76;1752.52,486.23;Float;True;Property;_MainTex;MainTex;1;1;[NoScaleOffset];Create;True;0;0;False;0;None;c2cb6f66b3819a142a9543418b581754;True;0;False;gray;Auto;False;Object;-1;Auto;Texture2D;6;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;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.RangedFloatNode;312;2419.777,872.9009;Float;False;Property;_VertexAOIntensity;Vertex AO Intensity;3;0;Create;True;0;0;False;0;0;1;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;367;2893.4,-46.09239;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode;347;2269.859,-65.1577;Float;False;Property;_BendAmount;Bend Amount;5;0;Create;True;0;0;False;0;0.05;0.002;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.OneMinusNode;313;2765.729,877.773;Float;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;256;2185.986,564.979;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;368;3215.028,-73.06921;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RegisterLocalVarNode;366;3587.334,-79.33336;Float;False;offset;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ComponentMaskNode;235;2876.426,554.1108;Float;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.LerpOp;311;2958.61,689.1798;Float;False;3;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.GetLocalVarNode;365;3405.757,850.6959;Float;False;366;offset;1;0;OBJECT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;310;3136.529,537.324;Float;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;3625.589,554.3845;Float;False;True;7;Float;ASEMaterialInspector;0;0;Lambert;Custom/Tree-Standard;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;True;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.33;True;True;0;True;TransparentCutout;;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;0;4;10;25;True;0.5;True;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0.03;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;3;Pragma;instancing_options procedural:setup;False;;Pragma;multi_compile GPU_FRUSTUM_ON __;False;;Include;VS_indirect.cginc;False;;0;0;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;372;0;343;2
WireConnection;372;1;373;0
WireConnection;331;0;309;1
WireConnection;331;1;328;0
WireConnection;371;0;372;0
WireConnection;350;0;338;1
WireConnection;350;1;338;3
WireConnection;330;0;331;0
WireConnection;341;0;350;0
WireConnection;341;1;371;0
WireConnection;344;0;341;0
WireConnection;369;0;330;0
WireConnection;345;0;333;2
WireConnection;345;1;344;0
WireConnection;367;0;345;0
WireConnection;367;1;370;0
WireConnection;313;0;312;0
WireConnection;256;0;76;0
WireConnection;256;1;73;0
WireConnection;368;0;367;0
WireConnection;368;1;347;0
WireConnection;366;0;368;0
WireConnection;235;0;256;0
WireConnection;311;0;330;0
WireConnection;311;2;313;0
WireConnection;310;0;311;0
WireConnection;310;1;235;0
WireConnection;0;0;310;0
WireConnection;0;10;76;4
WireConnection;0;11;365;0
ASEEND*/
//CHKSM=08BF0DF826338F6991B961579F6F62E70F42628F