@delicate epoch (I hope you don't mind the direct ping, but a few items for you) or anyone who can help.
Firstly some general NSprites-Foundations feedback:
- The Material on Sprite Renderer Authoring component is regularly set back to Missing after playing for some reason. I haven't had a chance to look into why this might be.
- The RegularSprite Shader provided by Foundations requires certain URP settings. This is probably a safe assumption, but I was using the 2D URP Template (which isn't really supported) which the Shader doesn't work with it. The lack of errors was confusing until I dove into the shader and saw some required features/tags.
My main current issue: Sorting.
I'm using BatchRendererGroups for my terrain. While my setup is custom, my OnPerformCulling (where the draw commands are created) is very similar to the base example: https://docs.unity3d.com/2022.2/Documentation/Manual/batch-renderer-group-creating-draw-commands.html
From what I gather, NSprites is making a Graphics.DrawMeshInstancedProcedural call within the SpriteRenderingSystem, yeah?
From what I see with respect to Sort Order / Sort Layer stuff, I'm starting to assume that sorting is only within the draw specific draw calls? Is it possible to sort across my BRG and NSprites Sprite Rendering? Is it possible to do my Terrain Drawing first? I don't see any controls when setting up my BRG, and the sorting options on the BatchCullingOutput seem related to that draw pass only?
General shader question: Do shader passes control draw order? Maybe my shader (which I hacked together) could be modified to render first so sprites are drawn on top of it?