The model that I’m skinning has 15K verices, ~100 bones. I empirically found out that I cannot pass more than ~60 bones in one shader, and when I reduced that number to 24, the performance is better. (Using Quadro FX 540, 128M) What is the explanation for that? How do I determine the maximum/optimum number of matrices to pass?
As I break up my model into primitive/vertex sets that only refer to 24 bones, the performance decreases again. ie, for my original test I used a single shader for all 15K vertices (but the animation was incorrect since I could only pass 24 bones). Now I’ve split my model into 7 vertex/primitive sets, and I call the shader 7 times passing in different sets of 24 bones. The performance dropped ~30%. Is this expected?
probably because of caching, registers or something, basically your hitting some physical limit that forces you to go at least partially into software mode.
not 30%, i can’t tell you where though, but basically 7 vertex/primitive is the same as 7 objects, and normally you have like thousands of them in every scene.
One might expect a slight drop if you multiply the number of objects by 10 or more (while still having the same triangle count).
But not 30%.
I can’t do anything more about it other than suggesting that you fidget around with all numbers and see which ones works better