mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2025-02-16 22:08:26 +00:00
A few more shader fixes
This commit is contained in:
parent
a0dd1b4f22
commit
d311562793
2 changed files with 5 additions and 4 deletions
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…
Add table
Reference in a new issue