Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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

Discussion in 'Editor & General Support' started by Comafly, Aug 30, 2017.

  1. Comafly

    Comafly

    Joined:
    May 30, 2014
    Posts:
    82
    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
     
    Last edited: Aug 30, 2017
  2. Comafly

    Comafly

    Joined:
    May 30, 2014
    Posts:
    82
    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.
     
  3. LaireonGames

    LaireonGames

    Joined:
    Nov 16, 2013
    Posts:
    505
    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 :p
     
  4. pegassy

    pegassy

    Joined:
    Sep 28, 2017
    Posts:
    49
    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.
     
  5. Vendrad

    Vendrad

    Joined:
    Jan 8, 2016
    Posts:
    4
    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)
     
    Spemble and RenanSylvestre like this.
  6. KQQky

    KQQky

    Joined:
    Feb 15, 2017
    Posts:
    1
    Thanks, increasing the bias on the directional light fixed it for me.
     
  7. RossHopkins

    RossHopkins

    Joined:
    Oct 28, 2016
    Posts:
    7
    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
     
  8. LaireonGames

    LaireonGames

    Joined:
    Nov 16, 2013
    Posts:
    505
  9. choco420

    choco420

    Joined:
    Jun 11, 2013
    Posts:
    10
    Close Unity, delete Library folder, open project and this will re-import everything.
    Solved for me
     
  10. camdenlink7

    camdenlink7

    Joined:
    Jun 3, 2018
    Posts:
    3
    Thank you so much! The bias fixed the problem!
     
unityunity