Directional Light Flicker in 5.4 b21?

Hi there! I was wondering if this was a known issue or if there is anything I can do about it:


I’m using deferred rendering, and my directional light that I use for the sun is flickering. Lightmaps are on, and the light is set to “Mixed”, instead of realtime or baked.
This happens on multiple graphics cards, and it also occurs in forward rendering mode, but in forward it only happens at certain camera angles for some reason. In forward rendering, the flicker isn’t as…aggressive, but it’s still there.

Any ideas? Or is this something I should expect from the beta?

Here are my light settings:

I updated to b21 and many objects started to flicker too. The issue was that many materials in the project used a wrong “Custom Render Queue” value. These materials all use custom shaders, not the Unity Standard shader.

I was able to solve that issue following these steps:

  • Switch the Inspector to Debug Mode
  • Select (all) materials
  • Set the “Custom Render Queue” property to -1

Using a custom render queue value of -1 instructs Unity to use the value that is specified in the shader, rather than using the cached value in the material.

Just wasted 2 hours with this same problem thinking it was something I did when I jumped from beta 20 to beta 22. I’m getting the same flickering on custom shaders, even when the custom render queue in debug mode is set to -1.

For example, I have 2 materials on one mesh, one set to Geometry and the other set to Geometry+1 in the actual shader code (not the debug inspector). In the debug inspector, the custom render queue is -1. It’s now flickering whereas in beta 20 and in 5.3 this didn’t happen. Interestingly, the flickering only happens when the object is not at the origin (0,0,0).

Can we expect this to be fixed in future betas?

Still seeing this issue in Beta 23. Submitted a simple repro project: Case 809845

1 Like

QA has been able to reproduce the bug. Hopefully it will get some attention soon.