- Home /
Adding Shadows to a Shader
Hey guys, I'm wondering how I would go about adding the ability to receive and give shadows to the toon shader? I won't ask for someone to do it for me, but if somebody wouldn't mind telling me how to go about it, it would be highly appreciated.
Thanks, Jordan.
Answer by Berenger · Feb 20, 2012 at 12:08 AM
You don't need to code shadows yourself, Unity is doing it (as a pass after user's ones I guess ?), but you need Unity Pro. Now that I think about it, maybe you can code Volume shadow as it takes meshes manipulation, but I think you need stencil as well. I'm digressing, sorry about that.
With Unity Free though, you cheat with Blob shadows. An object won't be able to cast shadow on itself but that's better than nothing.
Hah, I have Pro, but I had Cull Off in my shader for generating the alpha channel's transparency. I found out that you can't have both shadows on transparent shaders, so I just removed a few lines and got my shadows back. I guess for fading things I'll just need a separate shader, but thanks for clearling some things up for me :).
Your answer
Follow this Question
Related Questions
Adding transparency to a shadow 1 Answer
Outlines Defined by Shading Groups? 0 Answers
Unity 2D Shader Graph Sprite transparent when in shadow 0 Answers
Raymarching - bad shadows/light quality on fractals 0 Answers
Shader Warning Problem 0 Answers