- Home /
Matte Shadow Shader in Unity 5
Hi, I am working on a AR App, and I need a way to receive Shadows on an Object, that is invisible. I found a couple Shaders in the Internet, but none of these is working in Unity 5.
Answer by Namey5 · Apr 26, 2017 at 08:34 AM
Unless you only need 100% transparency outside the shadow and 100% opaque shadows, you can't. Transparent objects in Unity do not receive shadows.
I do need 100% transparency outside the shadow, but I need the shadow to be semiopaque. $$anonymous$$y use-case is different tho, I want objects to cast shadows on my UI, so I thought a transparent Quad which receives shadows would be great. It seems like this used to work before Unity 5, but no longer-- for some odd reason.
It didn't used to work; there were hacks to get around it, but they were nothing more. They relied on what were basically loopholes in Unity's rendering system, which have since been patched out. If you're using UI you could potentially render the objects as opaque, render the shadows to a texture and then in the UI shader add them back in.
Your answer
