I’m trying to make a foliage shader based on The Witness (reference image below) and the edges of my texture are transparent. When I apply the shader to a bush, the edges are solid. I’m a beginner at shader scripting and would appreciate any help.
The Witness

My Shader
Shader Script:
Shader "Custom/WitnessLeaves" {
Properties {
_Color ("Tint", Color) = (1, 1, 1, 1) // Leaf color
_Cutoff ("Alpha Cutoff", Range (0, 1)) = 0.5 // Adjust this threshold for leaf transparency
_EdgeTransparency ("Edge Transparency", Range (0, 1)) = 0.3 // Control edge transparency
_MainTex ("Leaf Texture", 2D) = "white" // Texture for the leaves
}
SubShader {
Tags {
"Queue"="Transparent"
"RenderType"="TransparentCutout"
}
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f {
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
sampler2D _MainTex;
float4 _Color;
float _Cutoff;
float _EdgeTransparency;
v2f vert (appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.uv;
return o;
}
half4 frag (v2f i) : SV_Target {
half4 texColor = tex2D(_MainTex, i.uv);
half alpha = texColor.a * _EdgeTransparency;
half4 finalColor = _Color * texColor;
finalColor.a = step(_Cutoff, alpha);
return finalColor;
}
ENDCG
}
}
}

Thank you so much! It works perfectly now.
– Hero_Holmes360