As you can see on video if I move my game objects 2500f (or even 200f) from world center point then shadows start to dance like crazy and if I go back to (0, 0, 0) everything is fine (don’t look at camera shake, it was some recording issue, only shadows flickering matters).
I’ve literally read every topic at google about it, I’ve found many solutions but none of them works. I’ve tested every option in editor:
graphic settings (even reseting and trying from 0), quality, bias, shadow distance, light rotation, camera far/near.
Only distance from center matters for me and I just can’t create 150x150 terrain.
I’m sure there is some solution, because for example there is no such problem in “Escape from Tarkov”. What am I doing wrong, what else should I check?
I’m using 2018.2.14, but I also tried with 2019.1.1 with same result. My graphic card is MSI GTX 1080.
In LWRP there were problems with trees and probably other shaders. I was really frustrated so decided to move my project to Unreal, always wanted to remind C++
I get the flickering in LWRP and the default pipeline. Raising the camera near z helps, lowering far z helps. The odd thing is that if you look at the Frame Debugger, most shadow casters stop drawing which would indicate that it is a culling problem.
At least the game speeds up when the casters are not rendering maybe it is an optimization.
Same issue here, but after using temporal antialiasing those glitches are almost(huge diference) gone. Tested on small cube at 5700f away from center with 0.05f camera near and 10000f far clipping.
guys solution is on temporal anti alising…lower jitter and all other settings…and shadows will stop flickering…just add post processing to scene in order to find temporal anti alising
Hello! As a quick fix for this, I found that disabling shadows on the directional light, fixed this flickering problem. Unity should definitely look into this though, as this really screws up devs. Hope this quick advice helps some. (Temporary Fix).
I’m not completely sure about this, but it could arise due to floating-point error at very large numbers. For whatever reason, Unity transforms are configured using single precision floating points instead of double. This means you can get something akin to a rounding error when you move too far from the origin. I don’t want to explain the binary architecture of floats here, but if you’re interested, this video does a great job of touching on these issues:
You should not be moving the player in an endless runner. You should move the world around the player. It’s quite odd at first, but a computer doesn’t conceptualize numbers like us, and it can only store a certain amount of precision. Hopefully this helps: if I say 0 and 0.1, you would recognize those as different numbers. If I say 11 million and 11,000,000.1 you would likely just round that to 11 million. Large numbers eat up the precision, so you should always keep the camera near the origin.
Setting my Far plane to 1500 on a 4km/4km terrain took away my flickering issue. This should not even be an issue to begin with but thats what i did to work around it for now.