- Home /
Terrain flickering due to real-time shadows?
I get occasional heavy flickering on my terrain now since I turned on real-time soft shadows. Any idea what could be the cause?
For an example, look at 0:29 and onward in this video: http://www.youtube.com/watch?v=pX8Q3tKHZMU
I started seeing this square shadow patch out of nowhere... is my lighting corrupted?
Answer by Magnus Wolffelt · Aug 07, 2010 at 09:31 AM
I found a way to.. kind of remove the issue. It seemed to be certain large objects causing these z-fighting shadows. I disabled the whole object hierarchy and then enabled it again, and the problem disappeared at this location on the terrain.
I am having the same issue, and the only way I have been able to even reduce it was to drop my shadow distance to nearly nothing. Were you able to resolve this? If so, do you know what you did? :) I have the problem on EVERY terrain object I create in unity.
Answer by TheDevGuy · Jul 30, 2015 at 09:05 AM
Just change the Clipping Planes "NEAR" and that will fix the issue about 99% of the time. Sometimes people will make the near place the minimum and that causes this issue. Try setting a value like .5
Also, there no need to mess with the shadow distance or bias in the light setting.
Hopefully this helps.
Surprisingly, that did fix it! I changed my Near clipping to 0.1 on my camera and that works for me. It was 0.02 before.
Yeah it fixes it, now I have no shadows at all.
I was having this same issue and clipping planes did not influence it. I turned both bias and normal bias up to max on my main directional light and it went away. I feel like this is not an ideal solution but it's the only thing I've found so far that works for me.
Been looking for "the simple solution" to this for so long that I'm embarrassed. Changed near clip to .5... PRESTO! Thank you TheDevGuy, you are my hero!
Answer by vbs · May 19, 2015 at 07:58 AM
I've been able to reduce the problem by fiddling with the shadow "bias" setting on the direction light object. Increasing the bias has reduced the flicker problem but it also seems to introduce issues where the beginning of the shadow is offset from where it's supposed to start.
Answer by AliAzin · Aug 02, 2010 at 11:52 AM
You can change the quality settings of shadows in : Edit > Project Settings > Quality try to change shadow cascades to four, shadow resolution to High and decrease the Shadow distance.
Hope that helps.
These settings seem to only affect the flickering of the actual shadows. This is something else - there's actually lots of flickering on large areas of the terrain that aren't receiving shadows. They are more like artifacts than flickering shadows.
Answer by Acreates · May 17, 2017 at 07:23 AM
I started seeing this square shadow patch out of nowhere... is my lighting corrupted?
Your answer
Follow this Question
Related Questions
Screen flickers when app is moving to background 0 Answers
No Shadows on Tessellated Terrain 1 Answer
Shadows popping in/out during runtime 0 Answers
[Android] Lights Issue 1 Answer
Unity 5 Directional Light Shadow Flicker 24 Answers