Fix for skin animations not working.

This commit is contained in:
Rinnegatamante
2020-10-23 20:01:52 +02:00
parent 611f451b16
commit e57d339660
+4 -4
View File
@@ -21,10 +21,10 @@ const char *skin_vert_src =
" fixed out v_fog : FOG,\n" " fixed out v_fog : FOG,\n"
" float4 out gl_Position : POSITION\n" " float4 out gl_Position : POSITION\n"
") {\n" ") {\n"
" float4x4 Skin = u_boneMatrices[(int)in_indices.x] * in_weights.x\n" " float4x4 Skin = u_boneMatrices[(int)(in_indices.x * 255)] * in_weights.x\n"
" + u_boneMatrices[(int)in_indices.y] * in_weights.y\n" " + u_boneMatrices[(int)(in_indices.y * 255)] * in_weights.y\n"
" + u_boneMatrices[(int)in_indices.z] * in_weights.z\n" " + u_boneMatrices[(int)(in_indices.z * 255)] * in_weights.z\n"
" + u_boneMatrices[(int)in_indices.w] * in_weights.w;\n" " + u_boneMatrices[(int)(in_indices.w * 255)] * in_weights.w;\n"
" \n" " \n"
" float3 SkinVertex = (mul(float4(in_pos, 1.f), Skin)).xyz;\n" " float3 SkinVertex = (mul(float4(in_pos, 1.f), Skin)).xyz;\n"
" float3 SkinNormal = (mul(float4(in_normal, 0.f), Skin)).xyz;\n" " float3 SkinNormal = (mul(float4(in_normal, 0.f), Skin)).xyz;\n"