fix normals with shape key and skin
This commit is contained in:
parent
8df6fc9176
commit
669898fae1
|
@ -25,6 +25,6 @@ def skin_pos(vert):
|
|||
def skin_nor(vert, is_morph, prep):
|
||||
rpdat = arm.utils.get_rp()
|
||||
if(is_morph):
|
||||
vert.write_attrib(prep + 'wnormal = normalize(N * morphNor + 2.0 * cross(skinA.xyz, cross(skinA.xyz, morphNor) + skinA.w * morphNor)));')
|
||||
vert.write_attrib(prep + 'wnormal = normalize(N * (morphNor + 2.0 * cross(skinA.xyz, cross(skinA.xyz, morphNor) + skinA.w * morphNor)));')
|
||||
else:
|
||||
vert.write_attrib(prep + 'wnormal = normalize(N * (vec3(nor.xy, pos.w) + 2.0 * cross(skinA.xyz, cross(skinA.xyz, vec3(nor.xy, pos.w)) + skinA.w * vec3(nor.xy, pos.w))));')
|
||||
|
|
Loading…
Reference in New Issue