X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=pbrvert.glsl;h=57633800ad4402dd2f4a5c6c55377f51a4c9a82c;hp=1cea9a8e24748fa82eb3752921e575c9d0fa544f;hb=dbd855720a9af7d6e599ddc50bbbb0dee85458a5;hpb=be8759aec179d6d7bed58732134673870c596b4f diff --git a/pbrvert.glsl b/pbrvert.glsl index 1cea9a8..5763380 100644 --- a/pbrvert.glsl +++ b/pbrvert.glsl @@ -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));