A few more shader fixes
This commit is contained in:
parent
a0dd1b4f22
commit
d311562793
Binary file not shown.
@ -134,27 +134,28 @@ void main()
|
||||
ivec4 index = ivec4(vBone);
|
||||
|
||||
vec4 objPos = vec4(vPosition.xyz, 1.0);
|
||||
objPos = mtxMdl * vec4(objPos.xyz, 1.0);
|
||||
|
||||
if (vBone.x != -1.0)
|
||||
objPos = skin(objPos.xyz, index);
|
||||
|
||||
objPos = mtxMdl * vec4(objPos.xyz, 1.0);
|
||||
|
||||
vec4 position = mtxCam * objPos;
|
||||
|
||||
normal = vNormal;
|
||||
normal = mat3(mtxMdl) * normal.xyz;
|
||||
|
||||
if(vBone.x != -1.0)
|
||||
normal = normalize((skinNRM(vNormal.xyz, index)).xyz);
|
||||
normal = normalize((skinNRM(normal.xyz, index)).xyz);
|
||||
|
||||
if (RigidSkinning == 1)
|
||||
{
|
||||
position = mtxCam * (bones[index.x] * objPos);
|
||||
position = mtxCam * (bones[index.x] * vec4(vPosition.xyz, 1.0));
|
||||
normal = mat3(bones[index.x]) * vNormal.xyz * 1;
|
||||
}
|
||||
if (NoSkinning == 1)
|
||||
{
|
||||
position = mtxCam * (SingleBoneBindTransform * objPos);
|
||||
position = mtxCam * (SingleBoneBindTransform * vec4(vPosition.xyz, 1.0));
|
||||
normal = mat3(SingleBoneBindTransform) * vNormal.xyz * 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user