- Home /
Transparent(invisible) Cube that casts shadows
Hi guys , i need to create some objects (cubes) that will block spotlight and cast shadows on other objects , but during the game .. they shouldnt be visible ... is that possible ???
Answer by Bunny83 · Jan 23, 2013 at 12:16 AM
Yes, that shouldn't be a problem ;) All you need is a shader that is classified as opaque shader by Unity but that doesn't render into the color buffer. However it has to be rendered into the depth buffer. To prevent the cube (which is "opaque") from blocking the view to things behind it, you have to put the shader on a render queue after the normal geometry.
That's all just a theory ;) You have to try it. The DepthMask shader might be a good start
Answer by temptest123 · Jan 23, 2013 at 04:06 AM
check this: http://answers.unity3d.com/questions/269292/having-an-invisible-object-that-casts-shadows.html
Your answer
Follow this Question
Related Questions
Cast shadows without directional light? 3 Answers
Spotlights "turn off" a certain distance from camera? Possible Lab Renderer issue (maybe not). 0 Answers
The shadows are drawing with some distance from casting object 2 Answers
What causes this shadow? (w/ image) 0 Answers
Casting shadow, without rendering the light itself??? 2 Answers