Lights and Culling Masks


Try as I might with different versions of layers and cameras and lights, i seem to be unable to remove a light source from a given camera. Even when the light and its parent object are in a layer included in the camera culling mask it still seems to show up regardless.

The problem has arisen because I have an FPS character with a head mounted spotlight/torch type thing. Another camera in the scene is used for showing a top down view for miinimap purposes. I don’t want the torch/headlamp thing to show up in the minimap, but I can’t seem to get it to not display.

Any tips or working examples would be gratefully received.


solution 1

render with shader that doesn't calculate light at all

solution 2

use OnPreRender to disable lights right before camera renders. don't forget to enable it after render finishes.