I need a object that’s culled by the MainCamera to still cast shadows on the rest of the scene. I’m new to Unity- is this possible? Seems like it could be a common situation (if I’m lucky). 
Thanks!
P.S. The same mesh needs to be visible to other cameras in the scene, so I can’t use any funky shader tricks to make this work. Thanks
Any tips on this would be very helpful.
Well basicaly if I understood correct, the object is still there when it’s out of camera’s range, so it will cast shadows on the other object, that you can see. Even if it wasn’t there, if you lightmap your scene, the shadow of the object will remain there no matter if there’s an object or not 
unfortunately it’s a dynamic object, and it’s in the middle of the screen, view of the MainCamera. It’s just on a layer that’s part of the culling mask of the MainCam, so it’s right there, but since it’s being culled, it won’t cast shadows.
I need the object to stay in the center of the scene, be invisible to the MainCamera, but still cast dynamic shadows that are visible to the MainCamera. Any ideas?
I made a shader for this problem. Just put it on the material you want to be invisible and shadow casting, no script needed.
509486–18119–$shadow.shader (2.07 KB)
You could use a second instance of the object that is simply culled entirely in order to have it still show up for other cameras. The shadow caster would still cast.
2 Likes
I just wanted to respond saying ty Pinkhair. Your shader solved a big problem I was having! Much appreciated 