Semi-transparent shader with Shadows

I need a shader that supports semi-trasparent objects and cast shadows, it doesn't need to receive it. Anybody knows one or knows if is possible to write one?

Next, only opaque objects cast and receive shadows; that means if you use built-in Transparent or Particle shaders then you'll get no shadows. In most cases it's possible to Transparent Cutout shaders (for objects like fences, vegetation etc.). If you use custom written Shaders, they have to be pixel-lit and use Geometry render queue. Objects using VertexLit shaders do not receive shadows either (but can cast shadows just fine).


I just need to cast the shadow from the transparent object, I don't need to receive it.

It's not really possible.!!?p=71027&viewfull=1#post71027

Just with shaders that's not really possible, but there might be a way if you have only some of those transparent objects and you have the time (and knowledge) to implement your own stencil shadow renderer. But it's a nasty piece of work (i did it one time just for educational purpose). If it needs support for multiple lights it gets even more complicated. A high light or object count will have a great impact on your performance. Also I'm not sure if a stencil buffer is available in Unity (i guess you can't change the device context parameters).

Hey, just check this out. However, it still shows some warning when I get it into my project even if it works.

So I still need someone who is good at Shader stuff for me to figure this out.
(( I’m now doing a project and I just cannot be sure if I could use this shader script if I build it as a .apk file.