Update gitattributes
[opengl.git] / pbrvert.glsl
index 1cea9a8e24748fa82eb3752921e575c9d0fa544f..57633800ad4402dd2f4a5c6c55377f51a4c9a82c 100644 (file)
@@ -21,11 +21,11 @@ void main() {
        texCoords = vTexCoord;
 
        mat4 boneTrans = bones[boneIds.x] * boneWeights.x;
-       /* boneTrans += bones[boneIds.y] * boneWeights.y; */
-       /* boneTrans += bones[boneIds.z] * boneWeights.z; */
-       /* boneTrans += bones[boneIds.w] * boneWeights.w; */
+       boneTrans += bones[boneIds.y] * boneWeights.y;
+       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));