I am wondering what is the performance difference between 2 constant buffer strategies.
For example, in my scene, there is a lot of objects. Some of them are static and others are not.
Create a big constant buffer containing all variables I need(objectToWorldMatrix etc). And use VSSetConstantBuffers1 with offsets to bind buffers.
Each object has its own constant buffer. Use VSSetConstantBuffers to bind buffers.
I feel Strategy 2 is better because I can cache static objects’ constant buffers, which are unchanged between frames. Strategy 1 has to update the buffer in each frame. Am I right?
I am a newbie of DirectX. Any suggestion for these two strategies?