UI Mask Bug -- Masks not working with certain BG Materials and Lighs in Deferred Rendering.

Hey yawl,

I’ve got a simple World Space UI setup with a few images and a mask in a very simple scene, that apparently satan has possessed because I’m getting some weird behaviour.

The mask has no effect. HOWEVER – I’ve got 3 point lights and a background wall. if I delete any one of these three objects the mask works. A few other interesting finds:

  • Switching to forward rendering seems to fix the problem.
  • the bg wall is using the Standard Shader. if I switch to something I made in shader forge, this also fixes the problem.
  • The object is not in any of the light’s falloffs, and moving the lights has no effect. nor does lowering their intensity to 0
  • I am excluding some layers from lighting. Re-including a layer I had not included on one of the lights fixes the problem, even though there’s currently nothing on that layer. There is also other random weirdness that happens when switching layer exclusions.
  • Copy/Pasting this setup into a new scene gives me the same result.
  • I have sacrificed 6 goats and have seen no effect.

Any ideas what’s going on? I’m using a lot of tiny point lights, so staying in deferred rendering is kind of a must here.

Bump! anyone from Unity watching? Help me exorcise these demons!

Can you file a bug report with a sample project so we can investigate?

Thanks Karl, I’ll see if I can isolate a simple scene so I don’t send you guys my entire project.

1 Like