• Create Account

### #Actualbelfegor

Posted 05 January 2013 - 06:35 AM

I have couple of different models with varying bones count.
To get away from shaders switch could i just use one for all without consequence?

I tried this and it worked:
MAX_BONES = 35;
...
vector<D3DXMATRIX> vMat; // vMat size varies from 20 - 30 depending on a model
...
effect->SetValue(hMatrices, &vMat[0], MAX_BONES * sizeof(D3DXMATRIX));


...
float4x4 mats[MAX_BONES];
...


### #2belfegor

Posted 05 January 2013 - 06:34 AM

I have couple of different models with varying bones count.
To get away from shaders switch could i just use one for all without consequence?

I tried this and it worked:
MAX_BONES = 35;...vector<D3DXMATRIX> vMat; // vMat size varies from 20 - 30 depending on a model...effect->SetValue(hMatrices, &vMat[0], MAX_BONES * sizeof(D3DXMATRIX));
...float4x4 mats[MAX_BONES];...

### #1belfegor

Posted 05 January 2013 - 06:33 AM

I have couple of different models with varying bones count.
To get away from shaders switch could i just use one for all without consequence?

I tried this and it worked:

MAX_BONES = 35;
...
vector<D3DXMATRIX> vMat; // vMat size varies from 20 - 30 depending on a model
...
effect->SetValue(hMatrices, &vMat, MAX_BONES * sizeof(D3DXMATRIX));

...
float4x4 mats[MAX_BONES];
...

PARTNERS