- Home /
The question is answered, right answer was accepted
Realtime spotlight shadows constantly flicker
I've been searching online for hours hoping to find someone else that has experienced my problem, however it seems that most people have only experienced flickering shadows with directional lights. In my scene, I have one directional light and one spotlight that is attached to the main camera and used as a flashlight. The directional light shadows work flawlessly. However, the spotlight parented to my camera also uses shadows which flicker constantly whenever the camera rotates. I tried using a point light and had no such issues. From my experience so far, it seems spotlights are very problematic in Unity (they also cause trees to light up suddenly, all at once).
I've tried tweaking the near and far clipping planes on my camera, the bias level on the spotlight, as well as the shadow quality settings. None of these settings makes even the slightest difference. Curiously, there's no flickering at all while standing still or using the keys to move around, it only happens when I move the mouse to rotate the camera. It also does not happen in the editor. If anyone has any idea what could cause shadows to flicker like this while rotating the camera, or knows of any settings I forgot to tweak, please let me know. I'm currently using the legacy deferred rendering path. The attached images show how just a slight camera rotation causes shadows to appear/disappear.
alt text
Answer by TheOneFreeMan · Aug 07, 2015 at 07:58 AM
Well, in case anyone else sees this and has the same problem, I "solved" it by using a point light instead (they are much more stable) with a cubemap containing a flashlight cookie in the front and black for the other sides.
Follow this Question
Related Questions
GameObject doesn't cast a shadow 3 Answers
(FIXED) How to remove Unity 5 shadow artifacts? 2 Answers
Flashlight cuts off 180 degrees 0 Answers
What causes this shadow? (w/ image) 0 Answers
Spotlight not lighting terrain? 6 Answers