• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
9
Question by sebeisdrache · Mar 04, 2015 at 10:56 PM · unity5shadowsdirectional lightflicker

Unity 5 Directional Light Shadow Flicker

Hello, after I updated my project to Unity 5 all of the shadows starting to flicker. In Unity 4.6 was no flicker with the setup.

Maybe is this a known bug?

Comment
Add comment · Show 8
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SnotE101 · Mar 08, 2015 at 01:31 AM 1
Share

Any luck? Having the same issue.

avatar image Mutrumbo · Mar 08, 2015 at 03:18 AM 1
Share

$$anonymous$$y $$anonymous$$m is also encountering this situation using a Directional Light.

avatar image polykos · Mar 10, 2015 at 11:24 PM 1
Share

same issue since I've updated Unity to 5.0 :(

avatar image sebeisdrache · Mar 11, 2015 at 12:41 AM 0
Share

It seams to be an Z-Buffer Issue, try a other near clipping distance to the camera.

I hope this will be fixed in the future.

avatar image hypnoticmeteor · Mar 11, 2015 at 01:06 AM 0
Share

Lights flicker when deferred rendering is not selected and DX11 is being used or maybe the opposite.

It used to happen to me sometime back, don't remember exactly but I did something in player settings which had to do with DX and rendering mode.

Show more comments

24 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by karpae2k · Nov 30, 2015 at 06:16 PM

I had this problem after adding a huge plane in the scene (water). So turn receive and cast shadows off on the plane or huge object. Worked for me

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image northernthumb · Oct 12, 2016 at 09:05 PM 1
Share

I had a weird gradient appearing in the shadows and turned out to be a massive floor bouncing light all over the place. Removed shadow from floor and added fake small floor to pick up the shadow and now works fine so HUGE thanks to @karpae2k for suggesting this

avatar image Rapisto · Mar 26, 2020 at 09:51 AM 0
Share

Yeeees! It fixed me problem!

avatar image
0

Answer by kideternal · Oct 18, 2015 at 09:13 AM

The fix for me was setting the rotation on my directional light to have integral values for each axis.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Beloudest · Oct 18, 2015 at 09:40 AM 0
Share

This sounds interesting, integral values, first time I have heard of them in maths or just forgotten. What was your reasoning behind this and how do you implement that? Cheers.

avatar image Mutrumbo · Oct 18, 2015 at 04:02 PM 0
Share

I suspect kideternal meant "integer" or whole, positive number (e.g., 100 vs. 99.9).

avatar image kideternal Mutrumbo · Oct 18, 2015 at 06:00 PM 0
Share

Yes, integer. Turns out I'm mistaken about this. All it did was revert to regular realtime lighting, which is nearly indistinguishable from baked in my complex scene until you compare framerate. (I'd have noticed sooner, but my bakes keep locking-up Unity at the end.) $$anonymous$$y apologies. :(

avatar image
0

Answer by Beloudest · Sep 28, 2015 at 06:30 AM

I too suffered with this issue. For me the solution was the shadow Bias on my main directional light. I had a very low value of 0.05 or something silly. When I cranked it up to 1 my shadows were perfect with no flicker. Lower the value the more flicker.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Beloudest · Sep 26, 2015 at 05:43 PM

The low near field clipping value fix also fixed a alignment issue with my global fog. Very strange but it seems low values do have strange effects on the deferred pipeline.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
5

Answer by bellatesla · Sep 20, 2015 at 08:29 PM

[Fixed] I came across this issue as well today I am posting because I actually found the answer to shadows flickering and what not with out the help of the forums.

After trying every setting I narrowed it down to the cascade distances of the shadows. After adjusting the "cascade splits" and "total cascades" I was able to remove this flicker effect completely. They are set to a default setting and depending on the camera ditance to your world you will want to adjust these to fit your needs. I hope this helps someone.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bartm4n · Sep 26, 2015 at 04:20 AM 2
Share

Thanks @bellatesla, I was able to find a workaround for this bizzare issue in forward rendering mode. The issue goes away in deferred, but some of my assets aren't compatible yet so this was helpful.

avatar image bartm4n bartm4n · Sep 26, 2015 at 06:54 PM 1
Share

Hm. It turns out that this actually only helped mask the issue. The flickering was present in deferred as well, just not as visibly. It turns out that one of my assets automatically added a special global fog image effect to the main camera which made AA apply ahead of it. I adjusted the order so that AA was last in line and the issue disappeared entirely .

avatar image toth-b-benedek-99 bartm4n · Apr 29, 2020 at 11:18 AM 0
Share

Oh, Thank You very much, bro! I've been struggling with this for days... I've tried everything, literally everything. And only your solution worked. Changing $$anonymous$$ain Camera Rendering Path to "Deferred" solved my issue completely. God Bless You! Cheers!

  • ‹
  • 1
  • 2
  • 3
  • 4
  • 5
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

59 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Huge unknown shadow in scene [android] 1 Answer

Directional light Shadow either Hard or No shadow on iOS 0 Answers

Unity 5.0 buggy shadows 1 Answer

How do you stop shadows from casting through meshes? 0 Answers

How to use trail renderer with directional light shadows enabled? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges