Fix USE_BONE_ARRAY (currently disabled.)

This commit is contained in:
Unknown W. Brackets 2014-08-17 10:55:10 -07:00
parent acaa7d8985
commit 147eb92c95

View File

@ -229,10 +229,18 @@ LinkedShader::LinkedShader(Shader *vs, Shader *fs, u32 vertType, bool useHWTrans
if (u_blendFixA != -1 || u_blendFixB != -1 || u_fbotexSize != -1) availableUniforms |= DIRTY_SHADERBLEND;
// Looping up to numBones lets us avoid checking u_bone[i]
#ifdef USE_BONE_ARRAY
if (u_bone != -1) {
for (int i = 0; i < numBones; i++) {
availableUniforms |= DIRTY_BONEMATRIX0 << i;
}
}
#else
for (int i = 0; i < numBones; i++) {
if (u_bone[i] != -1)
availableUniforms |= DIRTY_BONEMATRIX0 << i;
}
#endif
if (u_ambient != -1) availableUniforms |= DIRTY_AMBIENT;
if (u_matambientalpha != -1) availableUniforms |= DIRTY_MATAMBIENTALPHA;
if (u_matdiffuse != -1) availableUniforms |= DIRTY_MATDIFFUSE;