After making a minimap for my 2D technique recreation, I seen there was important lag, solely to understand that every hex has its personal draw name/lot. I have been enjoying round for a couple of day making an attempt to determine this out; strive several types of batch processing, gpu instantiation, and so forth.
Positive sufficient, it seems to be like my 2D objects meet the SRP batch requirement to belong to the identical batch, nonetheless they require completely different draw calls (which implies I am probably not getting the profit). one other publish right here maybe which means that I’ve nothing to do concerning batch processing, and my lag is a results of needing to (as a substitute) optimize the minimap state of affairs. That mentioned, since I can get them to make a single draw name with Sprites-Default, I suppose I am going to ultimately be capable to work out the way to do it with extra attention-grabbing shaders.
As a take a look at, I’ve a quite simple setup: a bunch of hexagons with a easy shader (shadergraph). I can get them grouped with Sprites-Default and have a single draw name, however for the lifetime of me I am unable to get them for any materials. Hexagons would not have scripts hooked up to them or are modified programmatically, nor do they use (occasion) vs. simply .
Notice: I’m utilizing Sprites/Sprite Renderers. I noticed the associated 3D query from a couple of years in the past, however I believe that answer refers to merging meshes, and I hope to not generate or merge meshes right here. The linked publish additionally appears to speak about meshes as a substitute of Sprites.
Any assist can be drastically appreciated, thanks (
EDIT: I’ve seen that if I take advantage of Sprite-Lit-Default I’ve the identical drawback. I believe it has to do with sprites which have normals and/or work together with lighting knowledge.
