Light culling Mask and Specular

Hi. I’m facing a small issue regarding the rendering of the light in UNITY.

Here’s my problem:

I have to meshes in the scene.
Each one of the mesh has a child (gameobject) with a light component
Each one of the mesh (and child) is in a specific layer.
Each light of the children have a culling mask with only the layer he is in checked.

The result is quite good, each light light his own parent and everyone is happy :slight_smile:

Except when you put a “bumped specular material” for the shader of the parents’ material.
The specular of the meshes are affected by all the light. I feel that the cullingMask et layers rules does not apply to the specular…

Is this normal behaviour? Is it me ? Is there any tips to solve this?

Thanks!
Rémi_

After a few tests, actually, the whole cullingMask thing for the light does not work in the Game.

The worst of it is that in the scene “tab”, the cullingMask is properly applied but when I switched to the game, all of my mesh are affected by light…

Any ideas?

I read that when the camera is set is deffered lighting, you cannot exclude more than 4 layers… I was excluding like all layers except one… so that’s why these settings weren’t working…

In case anyone need it… just set your camera to Forward rendering and you have up to 32 layers to play with…