diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-04-13 22:03:34 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-04-22 16:54:38 -0700 |
| commit | 2a5c77f43ff1d69e78f12f13435a38c5eb2ed854 (patch) | |
| tree | 5fe9bb681e4b8d4471f7efee278c96a24556b33b /Source/Core/VideoBackends/Software/TransformUnit.cpp | |
| parent | 39b2854b981aadec1576254ad5e4d91dc21c9709 (diff) | |
VideoCommon: Handle emboss texgen with only a single normal
Fixes a large number of effects in Rogue Squadron 2 and 3.
Diffstat (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/TransformUnit.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp index bf56307025..e1e6fd68a6 100644 --- a/Source/Core/VideoBackends/Software/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp @@ -90,22 +90,14 @@ void TransformPosition(const InputVertexData* src, OutputVertexData* dst) } } -void TransformNormal(const InputVertexData* src, bool nbt, OutputVertexData* dst) +void TransformNormal(const InputVertexData* src, OutputVertexData* dst) { const float* mat = &xfmem.normalMatrices[(src->posMtx & 31) * 3]; - if (nbt) - { - MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]); - MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]); - MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]); - dst->normal[0].Normalize(); - } - else - { - MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]); - dst->normal[0].Normalize(); - } + MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]); + MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]); + MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]); + dst->normal[0].Normalize(); } static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum, |
