Shader "GPUInstancer/CTI/LOD Leaves" { Properties { [Space(5)] [Enum(UnityEngine.Rendering.CullMode)] _Culling ("Culling", Float) = 0 [Space(5)] _HueVariation ("Color Variation", Vector) = (0.9,0.5,0,0.1) [Space(5)] _MainTex ("Albedo (RGB) Alpha (A)", 2D) = "white" {} _Cutoff ("Alpha Cutoff", Range(0, 1)) = 0.3 [Space(5)] [NoScaleOffset] _BumpSpecMap ("Normal Map (GA) Specular (B)", 2D) = "bump" {} [NoScaleOffset] _TranslucencyMap ("AO (G) Translucency (B) Smoothness (A)", 2D) = "white" {} [Space(5)] _TranslucencyStrength ("Translucency Strength", Range(0, 1)) = 0.5 _ViewDependency ("View Dependency", Range(0, 1)) = 0.8 [Toggle(_PARALLAXMAP)] _EnableTransFade ("Fade out Translucency", Float) = 0 [Header(Wind)] [Space(3)] _TumbleStrength ("Tumble Strength", Range(-1, 1)) = 0 _TumbleFrequency ("Tumble Frequency", Range(0, 4)) = 1 _TimeOffset ("Time Offset", Range(0, 2)) = 0.25 [Space(3)] [Toggle(_EMISSION)] _EnableLeafTurbulence ("Enable Leaf Turbulence", Float) = 0 _LeafTurbulence ("Leaf Turbulence", Range(0, 4)) = 0.2 _EdgeFlutterInfluence ("Edge Flutter Influence", Range(0, 1)) = 0.25 [Space(5)] [Toggle(_METALLICGLOSSMAP)] _LODTerrain ("Use Wind from Script", Float) = 0 [Space(10)] [Header(Animate Normals)] [Space(3)] [Toggle(_NORMALMAP)] _AnimateNormal ("Enable Normal Rotation", Float) = 0 [Space(10)] [Header(Options for lowest LOD)] [Space(3)] [Toggle] _FadeOutWind ("Fade out Wind", Float) = 0 [HideInInspector] _IsBark ("Is Bark", Float) = 0 } //DummyShaderTextExporter SubShader{ Tags { "RenderType"="Opaque" } LOD 200 Pass { HLSLPROGRAM #pragma vertex vert #pragma fragment frag float4x4 unity_ObjectToWorld; float4x4 unity_MatrixVP; float4 _MainTex_ST; struct Vertex_Stage_Input { float4 pos : POSITION; float2 uv : TEXCOORD0; }; struct Vertex_Stage_Output { float2 uv : TEXCOORD0; float4 pos : SV_POSITION; }; Vertex_Stage_Output vert(Vertex_Stage_Input input) { Vertex_Stage_Output output; output.uv = (input.uv.xy * _MainTex_ST.xy) + _MainTex_ST.zw; output.pos = mul(unity_MatrixVP, mul(unity_ObjectToWorld, input.pos)); return output; } Texture2D _MainTex; SamplerState sampler_MainTex; struct Fragment_Stage_Input { float2 uv : TEXCOORD0; }; float4 frag(Fragment_Stage_Input input) : SV_TARGET { return _MainTex.Sample(sampler_MainTex, input.uv.xy); } ENDHLSL } } //CustomEditor "CTI_ShaderGUI" }