2D Lighting Material Overlap Issues


I am currently making a game that will deal with a large amount of light and dark contrast. I have 3 main background layers consisting of the far background, the midground and the foreground(where players will interact with the most and what is seen in the picture). The picture attached shows the foreground and the character. The character has dropped a light on the foreground, however, where the prefabs have overlapped it is quite bright. The background and character art have a lot of images overlapping each other and this is a big issue.

How do I fix overlapping shading issues with a 2D game. This issue only happens when two prefab objects with the same material, on the same z, and on the same sprite rendering sorting layer overlap one another.

The background will have a lot of overlapping with certain pieces because they have to be on the same layer, so it is important that I get this issue fixed ASAP.

Here is another image showing a close up of the issue as well as some information from the inspector. The far left is the problem, the overlapping areas show up brighter than what they should. the middle section shows the properties of the prefab that is overlapping itself. And the right panel shows moss properties(light source, point light) that’s being used.

The material being used is a sprites/diffuse material. It is the only one that reacts well with the point light.

I re-worked the question to hopefully be more clear and added some clarification, I hope that helps.

Thank you from the WLB team

i was testing and the only solution for this its to use different sorting layers for each sprite.

I did a quick test on the issue and it seems having two sprites at the same z position, with the same Sorting Layer and Order in Layer does add up the brightness in 2D view. (switch to 3D and it’s gone).

I think you need to change at least the order in layer. Or move the Sprite on the z-axis.

I Managed to fix that problem by changing the light render mode to “Important”.


I juste saw your issue. (Sorry for my english, I’m learning ^^).

You can correct your z difference of your sprites by using a light directionnal with a coockie.
Look the doc how it works, it’s very easy.

With this way, you will be able to have a lot of difference between z without “step”.

But I have a problem, I don’t know why, When I put 2 ligths at the same place : the intensity is multiplied.
I would like the intensity stay the same when 2 lights are superimposed. Or, to have a limit of intensity.
How can I do?

Thanks, :),