Open thebeardphantom opened 2 years ago
This was intentional, but I see what you mean. https://docs.unity3d.com/ScriptReference/Light-cullingMask.html
The goal was to allow different cameras to render different subsets of the lights. I haven't looked recently - how does URP handle this? Should I just compare the light.cullingMask against the camera.cullingMask?
Following up - any chance you would be able to provide additional details on the behavior in URP and HDRP that you'd expect? (see my question above). Otherwise, Ill close this out soon - catching up + cleaning out old issues at the moment.
URP works the same as built-in. The culling mask on lights affects what object receive light.
I'm unsure if this was intentional (it looks like it to me), but BIRP, URP and HDRP do not cull lights based on if their GameObject layer is in the Camera's culling mask.
PSXRenderPipelineLighting::PushDynamicLightingParameters()
has a conditional on line 90 that does this:Lights already have their own culling mask for which layers they do and do not affect.