hi

i have searched quite a bit around but im afraid i didnt find what i was looking for, so ill post my question here…

im trying to do skinning in my vertex program and thus i need to load the bone matrices that affect the vertex. im trying this by using a generic attribute for each vertex which stores the matrix indices. my problem is now loading only those matrices.

i have tried it this way:

ATTRIB iMatrInd=vertex.attrib[6];

ADDRESS matrInd;

ARL matrInd, iMatrInd.x;

PARAM skin0[4]={state.matrix.program[matrInd]};

ARL matrInd, iMatrInd.y;

PARAM skin1[4]={state.matrix.program[matrInd]};

ARL matrInd, iMatrInd.z;

PARAM skin2[4]={state.matrix.program[matrInd]};

ARL matrInd, iMatrInd.w;

PARAM skin3[4]={state.matrix.program[matrInd]};

but it seems that i cant use relative adressing this way (get the error string that is telling me that the program matrices limit is exceeded).

so do i have to load all matrices and do the relative adressing later, and if thats the case how can i load all state.matrix.program matrices into one PARAM array?

[This message has been edited by Chuck0 (edited 07-13-2003).]