I think this is going to need to wait until tomorrow, unfortunately. The sidebar is still a mess visually, and is causing performance spikes because I haven't optimized that yet.
The gimbal sprites are all batching like nobody's business (woohoo!), and with the GUI off my performance is something like 80 to 120 fps where it was 80ish prior to the new batching, and 30ish prior to this new build. One thing to note is that fps is a bit of an exponential scale -- to move from 30fps to 40fps is shaving off way fewer ms compared to 80fps to 100fps.
The vast majority of the load is now on the CPU on my machine in things unrelated to rendering but instead related to things like ship orientations, etc. I'm a little concerned about that, but vector math only gets so fast, and once we're talking the difference between 80fps and 90fps with 7000 onscreen ships, we're really splitting hairs. There's just only so fast that will go given the scale, and this is a huge improvement over the hard-locked 20fps that AI War Classic had.
All that said, the gimbals themselves are doing some strange stuff because I've got some bad offsets in my math there (it worked with the old dimensions of geometry I was constructing by hand, but not by the instanced plane I'm using now). I need to fix that up, and fix up the GUI rendering to work, and then get the GUI spike killed, and then this is ready to go out the door.
The billboarding of the gimbals on the CPU is also something that concerns me, although it's being throttled and is not showing up in my performance profiling as being an issue. Still... I don't like it. I'd like to move that onto the GPU, where operations like that are so cheap and easy... but the math for that gets kinda messy because I have to do a bunch of matrix transforms and other messy things. It's doable, but I don't want to do it at the present time. Turning off all the billboarding on stuff didn't seem to actually affect the performance of this at all, so that was interesting.
I think that shots are right now causing more load than they should because of orienting to their movement direction, which is a big bummer. I think that I can solve that by doing a rotational matrix transform on the GPU if I give it a world-space coordinate in one of my custom shaders, but again that is something to wait for another release. I think that's eating up an unfortunate number of cycles during battle, though, at any rate.
I also found a surprising performance improvement in the form of Application.isPlaying being called too many times (5000ish times per frame in a battle with 5000 ships visible), so I optimized that down to 1 call regardless of how many ships are there. The deep profiler sometimes over-weights methods that get called a lot because of the instrumenting going on in there even if the method isn't that heavy, but in this case it was a worthwhile thing.
I'm really frustrated I couldn't get this out today, but the results are roughly what I hoped for. I was hoping I'd have more like a solid 120fps rather than something that fluctuates up to that, but I underestimated how much load is coming from other things on the CPU unrelated to rendering. Right now about 84% of the per-frame load on my machine comes from the CPU doing non-rendering-related things, and non-sim-related things. More or less. Some frames, it's closer to 40%. All that means is I have some more things to look into, and possibly some "loops to unroll," etc. I think there's a CPU-side square root check that I can cut out, for instance. There's some other throttling stuff I can probably do with the LODs, too.
But I'm not going to hold up the release for those bits!