Sorting and normal maps

Hi, I’m experimenting with the 2D lights package, and I’m having some issues with normal maps and sorting…

Now if the object with a normal map is in front, everything is ok:

6032171--651143--upload_2020-6-28_15-29-14.png

However, if it’s behind another object, then the normal map of the occluded object is used on the object in front…

6032171--651146--upload_2020-6-28_15-30-4.png

Is this a bug?

While it doesn’t occur if I move the objects to different sorting layers, however, I do want sorting based on y-position, as I want to do a 2.5 style game.

I was able to work around it by essentially recreating the standard lit 2d shader in shader graph.

EDIT:

Actually, no. Now I have the opposite proble, but it’s less noticeable. The box’es normal now overrides the characters, even though it’s in front :confused:

I too have this problem, and in my case, I use depth buffer as well and when i use depth buffer and normal, rendering normal is done before working with depth buffer making the sprite to actually draw correctly using depth buffer but with incorrectly rendered normal buffer… it is messed up right now.