forked from Mirrors/openclonk
Fix bone transformation of normals
The binding pose had twice the influence on the final normal vectors that it should have had. Change the shader calcs so the weights end up correctly.stable-6.1
parent
7c7aaece30
commit
e87c486545
|
@ -50,7 +50,7 @@ slice(normal)
|
|||
normalDir = normalize(gl_NormalMatrix * gl_Normal);
|
||||
#else
|
||||
vec4 base_normal = vec4(gl_Normal, 0.0);
|
||||
vec4 normal = base_normal;
|
||||
vec4 normal = vec4(0, 0, 0, 0);
|
||||
normal = merge_bone(normal, base_normal, bones[int(oc_BoneIndices0.x)], oc_BoneWeights0.x);
|
||||
normal = merge_bone(normal, base_normal, bones[int(oc_BoneIndices0.y)], oc_BoneWeights0.y);
|
||||
normal = merge_bone(normal, base_normal, bones[int(oc_BoneIndices0.z)], oc_BoneWeights0.z);
|
||||
|
|
Loading…
Reference in New Issue