Again, can you please point us to where you are undoing the bindpose? I don’t see that in your code.
I personally do it in the shader.
Code has been snipped.
#version 400 core
layout (location = 0) in vec4 vert_pos;
layout (location = 5) in float matrix_index;
layout (location = 7) in vec4 joint_indices;
layout (location = 8) in vec4 joint_weights;
layout(std140) uniform model_matrix_buff { uniform mat4 model_matrix[32]; };
layout(std140) uniform anim_joint_buff { uniform mat4 joint_matrix[1024]; };
layout(std140) uniform inv_bind_buff { uniform mat4 inv_bind_matrix[1024]; };
uniform mat4 projection_matrix = mat4(1.0);
uniform mat4 view_matrix = mat4(1.0);
void main()
{
vec4 t_pos =
((vert_pos * inv_bind_matrix[int(joint_indices.x)] * joint_matrix[int(joint_indices.x)]) * joint_weights.x) +
((vert_pos * inv_bind_matrix[int(joint_indices.y)] * joint_matrix[int(joint_indices.y)]) * joint_weights.y) +
((vert_pos * inv_bind_matrix[int(joint_indices.z)] * joint_matrix[int(joint_indices.z)]) * joint_weights.z) +
((vert_pos * inv_bind_matrix[int(joint_indices.w)] * joint_matrix[int(joint_indices.w)]) * joint_weights.w);
gl_Position = projection_matrix * view_matrix * model_matrix[int(matrix_index)] * t_pos;
}
You have to undo the bind position, that’s what the inverse bind pose is for, I don’t see you actually using it.