Camera ignores the "Culling Mask" settings

Main Camera ignores the Culling Mask settings - If the checkbox “Dynamic Occluded” (on the GameObject material) is disabled.

How to reproduce -

  1. Create a new scene
  2. Point Camera at the Cube
  3. Check off “Dynamic Occluded” on the Cube material
  4. Set any Layer on the Cube
  5. Exclude this Layer in the camera Culling Mask

And you will see that the Cube is still rendering by the Camera

2 Likes

If you think you found a bug in Unity, I recommend to submit a bug-report following the advice in this document.

Using the bug-reporter seems to be an important step, because it makes sure the report is in Unity Technologies bug-tracking pipeline and has to be processed at some point. Using the forum is often used to add to a little more attention to a bug-report, but does not replace submitting the bug-report.

It’s from advantage to attach a project to the bug-report that UT can use to reproduce the issue and test their fix against. The easier an issue can be reproduced by QA, the more likely it is to get forwarded to a developer, who might or might not work on a bug-fix for that at some point.

After you submitted the bug-report, you receive a confirmation email with a Case number. UT often asks us to post the Case number in the forum thread, which allows them to find that bug-report if they look at your post.

Following these steps will increase the chance that UT is looking at your issue tremendously.

Hi Rouf,
Thanks for reporting this issue! This has been fixed internally and will hopefuly make it into b5.

2 Likes

@LeonhardP I’ve just hit this issue in 2017.2.0f3 as well. Cameras completely ignore the layers/culling masks when the ‘dynamic occluded’ flag is set. Unfortunately, with ‘dynamic occluded’ enabled (which it seems to be by default) our normal rendering is having things get culled/disappear without any reason which is why I toggled the setting in the first place. Basically, multiple cameras being composited with different layers is broken. Is your fix being ported back to 2017.2.x?

Hi Greg,
Yes, unfortunately 2017.2 was affected as well. The fix will probably make it into the second patch release for 2017.2.

Is this issue in Unity 5.6?

No, this bug was introduced in 2017.2.

Thanks for the update. I searched the issue tracker but couldn’t immediately find any reference to it. Unfortunately 2017.1.x and 2017.2.0 have had quite a few bugs for us which has made for a frustrating last six months. A couple of big ones and quite a few small ones adding up to a bit of pain and waiting for a patch or next release to fix things again.

Just ran into this confusing bug and setting “Dynamic Occluded” did indeed fix it. Thanks!

guys this problem makes our game render 60k triangles every frame no matter there are just 30k total. 3 cameras and they’re for whatever reason ignoring the layers set. Please fix asap

Sounds like a different issue. Could you please file a bug report with a reproduction case?

I already switched to the latest beta, 2017.3.f011 and it is not present there. Thanks

1 Like