How to mask a light source with another light source?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By miguelroldao

Hi there,

I’m trying to mask a light source with another light source with no success.

In the linked screenshot you can see that the light on the player (light A) is being blocked by a wall on the left, casting shadows (This light2d is in mode MASK). However the the light source on the left (light B) is still visible. This is because in the tree node light A comes before light B. I want light B to be shadowed by light A, however, I also want it to be unaffected by light A’s texture. Is there a “standard” way of doing it?