Disable shadows (from Light3D) for a specific layer

Godot Version

Godot 4.3

Question

Hello!

I wanted to know if it was possible to disable shadows from a specific light for a specific layer.

Let’s say I have two spotlights (A and B), a floor rendered in layer 1, and a cube rendered in layer 2. I would like spotlight A to produce neither light nor shadows for layer 2, but to continue producing them for layer 1, while spotlight B produces both light and shadows for layers 1 and 2.

I did a test, but after disabling layer 2 on spotlight A, the light is indeed no longer produced for layer 2, but the shadows from this light are still being cast…

Is this currently possible? By the way, is this behavior intentional, or could it be some kind of oversight or bug in Godot?

Did you set the occluder’s mask too? If memory serves me right, this is what generates the shadows.

Are you talking about ‘LightOccluder’ ? It seems to be only for 2D :thinking:

I haven’t dabbled with 3D in Godot, so I can’t really say if there’s one for 3D, but I think I remember reading an article mentioning there was something similar for 3D. I might misremember, though. If that’s the case, I’m sorry.