I am trying to overwrite the built-in terrain grass shader so that I can edit it. I have imported the built-in grass shader to work off of, but my terrain seems to not be using the imported shader. No matter what I do with the shader, my grass still looks the same. I have no errors or warnings, and I have not renamed or changed the built-in shader that I downloaded.
(I am using Unity 5.3.1)
Thank you for your time, I would greatly appreciate any input.
This is the shader I downloaded (I am aware that non-billboarded grass uses a different shader, and my grass is set to billboard):
Shader "Hidden/TerrainEngine/Details/BillboardWavingDoublePass" {
Properties {
_WavingTint ("Fade Color", Color) = (.7,.6,.5, 0)
_MainTex ("Base (RGB) Alpha (A)", 2D) = "white" {}
_WaveAndDistance ("Wave and distance", Vector) = (12, 3.6, 1, 1)
_Cutoff ("Cutoff", float) = 0.5
}
CGINCLUDE
#include "UnityCG.cginc"
#include "TerrainEngine.cginc"
struct v2f {
float4 pos : SV_POSITION;
fixed4 color : COLOR;
float4 uv : TEXCOORD0;
};
v2f BillboardVert (appdata_full v) {
v2f o;
WavingGrassBillboardVert (v);
o.color = v.color;
o.color.rgb *= ShadeVertexLights (v.vertex, v.normal);
o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
o.uv = v.texcoord;
return o;
}
ENDCG
SubShader {
Tags {
"Queue" = "Geometry+200"
"IgnoreProjector"="True"
"RenderType"="GrassBillboard"
"DisableBatching"="True"
}
Cull Off
LOD 200
ColorMask RGB
CGPROGRAM
#pragma surface surf Lambert vertex:WavingGrassBillboardVert addshadow exclude_path:deferred
sampler2D _MainTex;
fixed _Cutoff;
struct Input {
float2 uv_MainTex;
fixed4 color : COLOR;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * IN.color;
o.Albedo = c.rgb;
o.Alpha = c.a;
clip (o.Alpha - _Cutoff);
o.Alpha *= IN.color.a;
}
ENDCG
}
Fallback Off
}