i have done a vertex skinning animation with 52 bones and all was working fine in the vertex shader before the new webgl spec but now i have this error : []index expression must be constant each time i index my bones matrix array because now its forbidden to put a variable in an array apparently in webgl. here is an example :


outVert += weights4 * (bones[bone4] * curVert);

outVert += weights5 * (bones[bone5] * curVert);//error index expression must be constant

outVert += weights6 * (bones[bone6] * curVert);//error index expression must be constant

outVert += weights7 * (bones[bone7] * curVert);//error index expression must be constant

any idea to fix it? thanks