- Home /
Why Do Shadows Sometimes Disappear Intermittently?
Using a single directional light and deferred rendering, I find that the shadows in my (simple) scene vanish sometimes depending on the camera position and orientation. When the camera is moving continuously this manifests as a flickering of the shadows.
I have seen other similar questions in which solutions have been reported as successful involving changing Unity's shadow-related quality settings, but none of these have had any impact in this case. Similarly, there is no reason to think this is z-fighting - which is often blamed - since the symptoms are different (shadow is either fully present or vanishes completely).
See this short video clip for a demonstration of the effect: http://www.youtube.com/watch?v=Wp-LGeI8vnY
Before anyone makes the obvious suggestion: my graphics card driver is up-to-date (ATI Radeon HD 3400). And in any case, shadows do not fail in this way for other 3D applications, so I am assuming I have made an error somewhere.
Nobody's been able to shed any light on this problem, but I eventually found a workaround. The effect only happens at certain camera angles, so adding a small irrational component to every camera coordinate eli$$anonymous$$ates the effect in practice.
The effect only happens at certain camera angles, so adding a small irrational component to every camera coordinate eli$$anonymous$$ates the effect in practice.
What you describe is what I'm seeing and nothing I do seems to work. $$anonymous$$y shadows flicker and disappear only at certain camera angle,regardless of clipping planes or shadow quality settings and distance.
I realize this is an old thread, but can someone explain "adding a small irrational component to every camera coordinate" so that I can give it a try?
I'd like to find a solution to this as well. It is most pro$$anonymous$$ent if you have a moving light source like a day/night cycle. No matter what quality setting I use it is still there just less noticeable. Not to mention raising the quality severely impacts performance.
Answer by Jhyrith · Oct 23, 2013 at 02:12 AM
Try changing your camera's rendering path to Vertex Lit.
If your scene has very pointy or low-poly environment, vertex lit will work best. Otherwise, normal mesh will create no shadow at all if Vertex Lit is used.
http://docs.unity3d.com/$$anonymous$$anual/RenderTech-VertexLit.html
Answer by corriedotdev · Apr 06, 2016 at 12:51 AM
In the quality section, check the distance of the shadows. This can cause issues with the camera as it moves OR if the object that should be casting the shadow moves. I know this is a very old question but should someone else see this its worth a shot. By adjusting the cameras position - as mentioned in ops answer - it essentially does the same thing. By moving the object close to the camera itself so it is displayed correctly
Thanks for the suggestion, but if you read the OP carefully you'll notice I already clarified that none of the quality settings had any impact.
Ultimately this effect was either a bug in Unity or at the lower levels of the graphics pipeline. Because Unity Answers is like a firehose of questions from developers of very different experience levels it's actually not very good for handling problems like this, but I try to always post them anyway so that other developers who hit the same thing have somewhere to discuss workarounds.
Answer by vtunity · Jan 26, 2017 at 10:08 AM
Change Render mode of your light (used for shadow) from Auto to Important it will solve your issue. make quality setting as Default now its will not affect to lights while light is Rendering as Important.
Answer by Acreates · Mar 12, 2017 at 06:01 PM
This just started happening to me as well. When I look away at a 45degree angle, the shadow immediately disappears and pops out of existence. If I look up above 30 degrees it also disappears. I'm reversing everything I did to find the culprit. I can't use GI lighting above .01 because it takes longer than 8 hours to bake (even on my new i7 machine).
Answer by enriquee3ppvgaming2 · Nov 07, 2020 at 08:19 AM
Sorry for ultimately late reply but the reason is your near plane is low... you need to max that out to fix the issue... It helped me fix it. @bateleur
Your answer
![](https://koobas.hobune.stream/wayback/20220613082235im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
projector causing flicker 1 Answer
Circle that cut shadows(What is that?) 3 Answers
Gameobject flickers on camera follow. Solved but with silly method :/ 3 Answers
How to share shadow between two cameras 1 Answer
orthographic camera and shadow 1 Answer