Is it still not possible in unity to have transparent shader to cast a shadow?
What do you mean “still” not possible? What’s wrong with, e.g.:
Shader "Custom/TransparentShadow" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
LOD 200
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma surface surf Lambert addshadow
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = 0.5;
}
ENDCG
}
FallBack "Transparent/VertexLit"
}
If you use a transparent-cutout shader then you’ll get real time shadows. If you are only going for lightmapped shadows then you can do with other shaders as well.