From d5622e4046884714f50d0e7be72dbfa3f43dce92 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Thu, 30 May 2019 19:21:06 -0400 Subject: [PATCH] Fix calculating I vector (Fixes shading on hands in Odyssey costum viewer) --- .vs/Switch_Toolbox/v15/.suo | Bin 1243648 -> 1243648 bytes Toolbox/Shader/Bfres/BFRES.frag | 2 +- Toolbox/Shader/Bfres/BFRES_PBR.frag | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 8fea0843dd17fab89f4ac38c2d49e096b8445a84..6e4b7bb01aba3a6ff27949b08aab71404f697a68 100644 GIT binary patch delta 5326 zcmeHL3vd+Yk)Hpb{by!(XJ=QVl@QVj3k6F;)(c?^j6tjfwsClzc$g55ha{fnWdSlK z;^9Rm7&`<@8g4trHo<_$LcAma`xB$UBJ;3)SP?Szal9=12*w16jDd3qM(F`UFqNvL z?&_*8Rhg=9rvL8#`|s|*=kM7KTp1X+GO%LIBVSTM_%RWLF^I8i zP$d(rto}W#qBBWQMVm^;4#!d^+;0=nU7|evv7b*=y+7U9-|%vp+Dd$~{Ow zBVFl7t{StIWbzy1HN}V;dEXMzvLJLc^6Ya-v9$y#GX7wH)xI9N8xS>6If_O;c(c8| z{eEmiaV??_aZ6TL*Mn54DJ0hDst&X_F+u2tu6m6{Y8=^Qyrw>858@atwYM0j)MWen zs4)S(dBkwJI@rA^i$YVnk?wlv(H|inV;5o(-{A}&j#uBIt?_sq7a|rTFB&lrF$%~3 z21R@5v-R3?`ace#UQeNi{!casnq;nB1sAt7%UEPsyd0vCh_YmJ8EPk5NHEMe21$U&D#xpo`8sgsA`Wri= zlF7d9r=oz8Eyi;(FObc~)tDEYn{Z7lQFy@-Rg5!McN{G>VJ((Bjk36u?TN9&G;2c2 z-!&mMb$gf8<~$;9zdF6$?WA@=2t?jC-aeH4V0+@ivoF~gazV9`LG0GH^Sl`HD&ZFx ziP2SyV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--git a/Toolbox/Shader/Bfres/BFRES.frag b/Toolbox/Shader/Bfres/BFRES.frag index 38208fc0..53140bfa 100644 --- a/Toolbox/Shader/Bfres/BFRES.frag +++ b/Toolbox/Shader/Bfres/BFRES.frag @@ -183,7 +183,7 @@ void main() } // Calculate shading vectors. - vec3 I = vec3(0,0,-1) * mat3(mtxMdl * mtxCam); + vec3 I = vec3(0,0,-1) * mat3(mtxCam); int NormalMapUVIndex = 0; diff --git a/Toolbox/Shader/Bfres/BFRES_PBR.frag b/Toolbox/Shader/Bfres/BFRES_PBR.frag index 307172a7..a75cabf8 100644 --- a/Toolbox/Shader/Bfres/BFRES_PBR.frag +++ b/Toolbox/Shader/Bfres/BFRES_PBR.frag @@ -286,7 +286,7 @@ void main() } // Calculate shading vectors. - vec3 I = vec3(0,0,-1) * mat3(mtxMdl * mtxCam); + vec3 I = vec3(0,0,-1) * mat3(mtxCam); vec3 N = normal; if (HasNormalMap == 1 && useNormalMap == 1) N = CalcBumpedNormal(normal, NormalMap, vert, 0);