Hi !!
I am currently working on an old project, made on Unity Builtin Render Pipeline.
In this game, there are a lot of 2D sprites and lights. Here an example with some rocks :
Each little rocks of the bigger one is a different renderer.
So for performance reason, i decided to group little renderers into a same mesh.
I did that because :
forward renderer + pixel lightning + different drawOrders + a lot of sprites = a lot of DrawCalls.
Here the result :
As you can see, now i get some problem with my lightning…
Any transparent part which is superposed to another is brighter, and that’s slightly ugly. I’ve tried to organize vertices to get a proper z-index for each rectangle, but nothing to do :
In my shader :
ZWrite On
...
#pragma surface surf Standard alpha:fade keepalpha exclude_path:deferred vertex:vert noshadow novertexlights nodynlightmap nodirlightmap nofog nometa nolppv noshadowmask
Anybody have an idea ? Thanks in advance