Hello there! I'm trying to create a "highlight" feature that basically change the color of the character with a specific layer.
Since I have multiple different materials and some of them are not editable without copying them entirely (like Spine ones) I'm using Renderer Feature from URP (for 2D).
So far so good,** everything works fine except one thing** : I can't make the 2D sorting works properly whenever my shader is applied through the renderer feature.
From what I understand after long tests : since I'm hooking on specific moments of the pipeline After rendering transparents, the natural sorting order is ignored by Unity. Also, since I'm just "redrawing" => basically there is no information on sorting. Unity just redraws whatever I tell him to redraw
I have read a ton of documentation about it but can't figure out how to keep Y sorting or if it's even possible.
With the highlight feature off (first screen) everything is pretty good, nice Y sorting etc.
With the highlight feature on (second screen) my highlight works, but Y sorting is broken.
Message is too long so code and shader is included in linked files, sorry for that 🙁
If you have any hints, clue or whatever, I'll take them! Thanks you