Fix SpotLight and OmniLight cull masks not working in mobile renderer#86105
Fix SpotLight and OmniLight cull masks not working in mobile renderer#86105jsjtxietian wants to merge 1 commit into
Conversation
|
Hmm, this seems like a stopgap measure. In the mobile renderer the layer mask should already be applied during the culling stage as lights are paired with the objects they illuminate. A light should never end up being paired to an object if the layer mask doesn't match. Double checking it in the shader should yield no difference, only introduce more overhead. If there are objects lit by lights that shouldn't light it, then there is an issue in the culling system. |
Interesting, so the real bug is lying in the cpu code, that does explains why it can cull the object in the first place, but after the object moves it stops working. I will take a look. |
|
Superseded by #98266 |
Fixes #82263
I'm not sure whether there's any unexpected impacts that prevents us from adding it at the first place, feel free to correct me.