- Home /
culling mask on camera ignores layer on lights?
I have a camera that isn't allowed to see objects that are layered "red" or layer number 13. However if I create a light object - point light - and make it's layer "red" the camera can still see the light reflected off of other stuff. sup with that?
Answer by Jessy · Mar 24, 2011 at 01:02 PM
Lights have a culling mask; that is what you need to use.
I would but I have multiple cameras - multiple players. I don't want this player to see the light reflecting off the surroundings but I do want the other player to. therefore I need a culling mask on the camera to not see the lights that are layered in layers its not supposed to see. that was my problem I found a work around but I wish it worked the way it is intuitively supposed to work in the first place.
Sorry for resurrecting a reasonably old thread, but out of interest - what was the workaround you found for this? I'm running in to similar issues where I basically need to find a way (if at all possible) of only displaying reflections from certain light sources on a very specific camera.
The culling mask isn't really suitable for this, as both cameras are going to be looking at the same environment. Sounds like this is precisely what you encountered and fixed?
Looks like I made some headroom on this for my purposes at least. Just need to iron out a few bugs involving a bit of light flicker.
But essentially, keeping lights disabled and then enabling them for one frame and then disabling again in a scripts LateUpdate - while forcing a Camera.Render() did the trick.