binkle on Nostr: first step is identifying what kinds of things can be sorted together. There are 3 ...
first step is identifying what kinds of things can be sorted together. There are 3 different GL calls I use to draw things currently: glDrawArrays, glDrawElements, & glDrawArraysInstanced
With an additional distinction made for billboarded vs 3d objects as well as certain special cases like post-processing passes, which sort of have to be their own thing.
In the absolute most wildly optimistic case, I could cut the number of shader programs down by 9, and if I made fruits a billboarded object I could make that 10. When I consider that I currently have 22, that marks a significant change.
Even if I were being very conservative and cut it in half, I think a 1/4 improvement in shader program count is still pretty good.
With an additional distinction made for billboarded vs 3d objects as well as certain special cases like post-processing passes, which sort of have to be their own thing.
In the absolute most wildly optimistic case, I could cut the number of shader programs down by 9, and if I made fruits a billboarded object I could make that 10. When I consider that I currently have 22, that marks a significant change.
Even if I were being very conservative and cut it in half, I think a 1/4 improvement in shader program count is still pretty good.