From d311562793591e6028acca7684845058807d33ee Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Thu, 16 May 2019 19:34:09 -0400 Subject: [PATCH] A few more shader fixes --- .vs/Switch_Toolbox/v15/.suo | Bin 1278464 -> 1278464 bytes Toolbox/Shader/Bfres/BFRES.vert | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 32a117b76405f107c9d314298c6926c549f9c274..77edd12cb8233e3ce3910d25ef0bb0bcf0c69e39 100644 GIT binary patch delta 1954 zcmZvc4Nz3q6@d5LclW)wZ{IGv%O-9u5?EKXgit~eDO%V-Vh9?3HiT&n5>SGu6wrv# zPDg1(sEtElU&3)PCd`(+G(RQ5P4;G-*xAruwN;uJo5@f^Y=&kUqsFl_DHBW2%P^Vg zOy11*&N=s|J&E_DfG0bXYxxOIfSVVRemG&)?iG-wPjlC=F)jtGPY31?1CI2d8=_K^xc4uv?!56o_k0hB&-NyDikWS6pP}8K}%mt z`f_s4Cp6M;Cs{$1FZjsRi~GsGlc)ltaM`~^Mj@M#hVvmT!fRME(|ik<(bEzVp(ZwM zPn?Hc0P95eR`!HEl)Nl1?_++5=0tHk0X5=M7fW|09%l^zs@Qmd{n82zieL}B2xcE+ ziC?fD_>OgYo2WmVi5B7!qLtV}v=Lhg%jW~@_LUAL1Lk42km%=Dq5;M*^fdDb&r|H0 zWDYWpWfx(E)f#Rz-QXhc2%7@)Jm=;Jxo$eGw~E&H`G^u7pjyT#1;(-=A9IIYw_@IL z#>M)V*z4tHj-6xA7DijW!lot6e}Vb2=&GcPj6C~{*W?nz*sIKE3g!i_nJ=+` z$?eRXWFBibC8B9No0QCVSQ^#!WpoKuo-fnpuSx0VTE#OoF)gMy$ss3R3P~q${Du@1 z(-m^aVFtJ#?;4aR@U|yqyGYb4m3A|S%NX>!>T&Qhy+k~9L~eKCov$frIP-y;E{gN{ zA2ym?Vdfw&Nfaxe_IeM~{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b/Toolbox/Shader/Bfres/BFRES.vert @@ -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; }