[Solved] Flickering Shadows in-editor, none in preview or exe

Hi all. I have encountered what is possibly a bug. Last night after I’d finished working on a project, I shut down Unity and went to bed. I woke up this morning, booted up Unity, and now have this weird shadow-flickering whenever I move around in the editor. Literally nothing has been changed in the project.

As you can see its a sort of weird flickering/crosshatching effect, with an odd circular shadow that appears when the in-editor camera approaches a surface. Playing the game in the preview window and in the exe is fine however, with no flickering shadows to be seen.

This flickering only happens with the directional light. Removing the directional light and using only spotlights and point lights works absolutely fine.

Running Unity 2017.1.0f3. Have tried a complete reinstall, and rolling back to the version before this one, and the problem persists across versions.

Any ideas or help would be greatly appreciated. Cheers

Well after messing around for a few hours I “solved” the issue simply by copying and pasting all of my assets in to a new scene.

After doing that and seeing no issues in the new scene, I just reopened my original scene and the shadow flickering was gone…

I’d tried opening other scenes, but the issue persisted. It wasn’t until I copied and pasted all of my assets from the problem scene in to a new scene that it resolved itself. No idea what the issue was there, but it’s no longer happening so no complaints here. I’ll leave this post here in case anyone stumbles across the same issue in the future.

I had seen this as well, it was a Unity bug that I flagged (probably others did too). I think it got fixed in 2017 but not 100% on that.

Anyway the workaround the unity guys gave me was to ensure there was a new standard material in your cameras view, so my materials/shaders were corrupt in some way but having a standard cube in the cameras view fixed the problem for me. Pissed me off having this spec (since I made the cube tiny) there for so long but my shadows worked once I did :stuck_out_tongue:

I solved the issue by going to my Sun (directional light source) changing it to a point light source and then back to directional. The flickering was gone.

Just in case someone sees this… Check that that the “Bias” is not too low on directional lights that are illuminating the area that is exhibiting these artefacts. (Sun)

2 Likes

Thanks, increasing the bias on the directional light fixed it for me.

Hey guys most likely its a floating point error if your objects is too far from world zero point quardinants
mine was at 32,564

Nope this is still 100% a Unity bug. I had their QA confirm it and then entirely ignore it.

I still have this issue only 256 units away from origin :frowning:

Although you are right to say that it might get worse or happen instead for FPP at that distance but really Unitys shadows are just fundamentally flawed :stuck_out_tongue:

Close Unity, delete Library folder, open project and this will re-import everything.
Solved for me

Thank you so much! The bias fixed the problem!