Do boning and animation properly
[opengl.git] / pbrvert.glsl
index 775cebfb0f411c04aa80c10f195e1e31cad1308b..57633800ad4402dd2f4a5c6c55377f51a4c9a82c 100644 (file)
@@ -25,7 +25,7 @@ void main() {
        boneTrans += bones[boneIds.z] * boneWeights.z;
        boneTrans += bones[boneIds.w] * boneWeights.w;
 
-       mat4 bonedModel = boneTrans * model;
+       mat4 bonedModel = model * boneTrans;
 
        worldPos = vec3(bonedModel * vec4(pos, 1.f));