- Home /
Projector shadow showing through objects
I have a shadow projector that's making some weird visual artifacts.
In this image, a row a wall segments is partially covered by a shadow projector. The projector is pointed straight down. The walls are about twice as thick as they look. The upper half is in the shadow, along with the rest of the top of the image.
Lines appear between each segment, when they're nearly perpendicular to the camera, but these aren't gaps between the meshes. The lines are being drawn by the projector. My best guess is that these are the faces of the cubes that are facing each other, with the shadowed parts being drawn on top of the walls' front faces. I'm not sure why this is happening, or how to fix it. I tried tweaking various properties of the projector component and shaders, but nothing seemed to have any effect on it at all. How do I make these things disappear?
Edit: Here's a better view of the problem: http://i.snag.gy/4WdgM.jpg On the left, the two cubes are selected so you can see how they're positioned. The projector is casting a black shadow downward onto the ground, and on half of the back cube. On the right, the cubes are viewed from the front. The shadowed part of left face of the back cube is visible, despite it being clearly covered by the front cube.
Do you need the shadow on your wall to be real time? If not "bake" the wall ins$$anonymous$$d, as long as the segments overlap the baking should work ok. I had no end of problems with projectors in the past and stopped using them. They double your poly count as the create a duplicate of the geometry they shine on then display the shadow on the transparent duplicate. Also they will give you one extra draw call per projector($$anonymous$$). So if you use a lot of these the draw calls will quickly stack up as will your poly and vert count :(
Answer by Kenoli · Oct 22, 2014 at 01:39 PM
I've found a solution, though I'm not really sure why it works. I switched to using a slightly modified version of the ProjectorAdditive shader seen here: http://wiki.unity3d.com/index.php?title=ProjectorAdditive I set the shader to "Blend Zero OneMinusSrcColor", and inverted my shadow image.
Your answer
![](https://koobas.hobune.stream/wayback/20220613165617im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Render just one object 1 Answer
Why standard projector don't work currectly? 0 Answers
Echo-location 0 Answers
daylight simple water projector issue 0 Answers
Unity Blob shadow projector massive tris amount, why? 1 Answer