Fix for skin animations not working.
This commit is contained in:
@@ -21,10 +21,10 @@ const char *skin_vert_src =
|
||||
" fixed out v_fog : FOG,\n"
|
||||
" float4 out gl_Position : POSITION\n"
|
||||
") {\n"
|
||||
" float4x4 Skin = u_boneMatrices[(int)in_indices.x] * in_weights.x\n"
|
||||
" + u_boneMatrices[(int)in_indices.y] * in_weights.y\n"
|
||||
" + u_boneMatrices[(int)in_indices.z] * in_weights.z\n"
|
||||
" + u_boneMatrices[(int)in_indices.w] * in_weights.w;\n"
|
||||
" float4x4 Skin = u_boneMatrices[(int)(in_indices.x * 255)] * in_weights.x\n"
|
||||
" + u_boneMatrices[(int)(in_indices.y * 255)] * in_weights.y\n"
|
||||
" + u_boneMatrices[(int)(in_indices.z * 255)] * in_weights.z\n"
|
||||
" + u_boneMatrices[(int)(in_indices.w * 255)] * in_weights.w;\n"
|
||||
" \n"
|
||||
" float3 SkinVertex = (mul(float4(in_pos, 1.f), Skin)).xyz;\n"
|
||||
" float3 SkinNormal = (mul(float4(in_normal, 0.f), Skin)).xyz;\n"
|
||||
|
||||
Reference in New Issue
Block a user