Transparency with realtime shadows?

Has anyone had any luck finding a shader that uses transparency and still casts shadows (as if the object wasn’t transparent)? The built in transparent shaders all remove the shadow as soon as they are applied

Many thanks

I solved this 10 minutes after I posted this! Sorry guys! If anyones interested in this, I used the strumpy shader editor to create a quick simple transparent texture with a shadow pass then hacked together part of a unity 2 shader for masking and got exactly the effect I wanted :slight_smile:
Here is the shader if anyones interested.

Shader "My Shaders/Transparency Z Enabled with Shadow"
{
	Properties 
	{
_MainTex("_MainTex", 2D) = "white" {}
_Color("_Color", Color) = (1,1,1,1)

	}
	
	SubShader 
	{
		Tags
		{
"Queue"="Transparent"
"IgnoreProjector"="False"
"RenderType"="Transparent"

		}
Pass {
	ColorMask 0
}		
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB


		CGPROGRAM
#pragma surface surf BlinnPhongEditor alpha addshadow vertex:vert
#pragma target 2.0


sampler2D _MainTex;
float4 _Color;

			struct EditorSurfaceOutput {
				half3 Albedo;
				half3 Normal;
				half3 Emission;
				half3 Gloss;
				half Specular;
				half Alpha;
			};
			
			inline half4 LightingBlinnPhongEditor_PrePass (EditorSurfaceOutput s, half4 light)
			{
half3 spec = light.a * s.Gloss;
half4 c;
c.rgb = (s.Albedo * light.rgb + light.rgb * spec);
c.a = s.Alpha + Luminance(spec);
return c;

			}

			inline half4 LightingBlinnPhongEditor (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
			{
				viewDir = normalize(viewDir);
				half3 h = normalize (lightDir + viewDir);
				
				half diff = max (0, dot (s.Normal, lightDir));
				
				float nh = max (0, dot (s.Normal, h));
				float3 spec = pow (nh, s.Specular*128.0) * s.Gloss;
				
				half4 res;
				res.rgb = _LightColor0.rgb * (diff * atten * 2.0);
				res.w = spec * Luminance (_LightColor0.rgb);

				return LightingBlinnPhongEditor_PrePass( s, res );
			}
			
			struct Input {
				float2 uv_MainTex;

			};


			void vert (inout appdata_full v, out Input o) {
float4 VertexOutputMaster0_0_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_1_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_2_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_3_NoInput = float4(0,0,0,0);


			}
			

			void surf (Input IN, inout EditorSurfaceOutput o) {
				o.Albedo = 0.0;
				o.Normal = float3(0.0,0.0,1.0);
				o.Emission = 0.0;
				o.Gloss = 0.0;
				o.Specular = 0.0;
				o.Alpha = 1.0;
float4 Tex2D0=tex2D(_MainTex,(IN.uv_MainTex.xyxy).xy);
float4 Split0=_Color;
float4 Master0_1_NoInput = float4(0,0,1,1);
float4 Master0_2_NoInput = float4(0,0,0,0);
float4 Master0_3_NoInput = float4(0,0,0,0);
float4 Master0_4_NoInput = float4(0,0,0,0);
float4 Master0_6_NoInput = float4(1,1,1,1);
o.Albedo = Tex2D0;
o.Alpha = float4( Split0.wwww);

			}
		ENDCG
	}
	Fallback "Diffuse"
}

The color doesn’t actually tint the texture as I didn’t need that, it’s just the alpha component of the color that is used to control the transparency.