Shadows on transparent objects using Alpha cutoff

Hello,

I am both new to the Unity forums and very new to shaders. I am attempting to get shadows to appear on a transparent object. After some reviewing and reading of posts on these forums it seems that this is not a particularly easy objective. So I am trying to take a different approach, of using the AlphaTest to cutoff anything that is not the shadow. Heres where being a complete beginner comes into play.

Looking at the unity shader reference page for alpha cutoff it says that alpha cutoff comes after lighting and shading but before blending. Are shadows rendered in those lighting stages or in the blending stage? Unity - Manual: ShaderLab: legacy alpha testing

First question I have is this approach possible? Or even the best approach to this kind of problem?

If at all possible could anyone point me in the right direction of how to get this done. Also I don’t know CG yet so I am trying to do this all in Shaderlab. CG is my next goal and if I have to go there sooner rather than later I will.

Quick recap and some clarifications. I want shadows to appear on transparent objects, however I get there makes no difference to me. My current attempt is using the Alphatest function to only render the shadows on the object.

Feel free to PM me or reply to this post with any questions.

Eternal Gratitude to those that help me out.

Thanks a bunch
-Germ

P.S. If any one could point me in the direction of some ShaderLab or CG tutorials that would also be extremely helpful.

Hey to any one else looking for this kind of answer here is a decent solution. Doesn’t have the full extent of what I was looking for but it will do for now.

http://forum.unity3d.com/threads/72400-shadow-on-the-plane-everything-else-to-be-transparent-how-to?highlight=shadow+transparent

Thanks,
-Germ

To answer your first question, that pipeline diagram is executed separately for every single draw call. This means once for each shadow-casting object for each shadow-casting light in order to generate shadow maps using your shadow collector and caster passes, and at least once per object to render the object to the screen (depending on the rendering mode and the lighting situation).

For easy shadow support using an alpha cutoff, add this to the end of your Shader block:

FallBack "Transparent/Cutout/Diffuse"