diff options
| author | Tilka <tilkax@gmail.com> | 2024-10-12 19:49:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-12 19:49:48 +0100 |
| commit | d43c6dc555fea0b0ec84d05779a62dc876b70bf4 (patch) | |
| tree | f7e24ca237cdda8cde7e611ee52806fdea96292a /Source/Core/VideoCommon/VertexLoader_Normal.cpp | |
| parent | 35ec2e97a8ea90730cb33eceec701f81597f98f7 (diff) | |
| parent | 937bb2aa2e12b635ba328af8de7c9a5d5963d084 (diff) | |
Merge pull request #13074 from Pokechu22/normal-cache
Cache normals in addition to binormals and tangents
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Normal.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Normal.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp index b91c7fe127..50e0dbbd63 100644 --- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp @@ -49,7 +49,9 @@ void ReadIndirect(VertexLoader* loader, const T* data) const float value = FracAdjust(Common::FromBigEndian(data[i])); if (loader->m_remaining == 0) { - if (i >= 3 && i < 6) + if (i < 3) + VertexLoaderManager::normal_cache[i] = value; + else if (i >= 3 && i < 6) VertexLoaderManager::tangent_cache[i - 3] = value; else if (i >= 6 && i < 9) VertexLoaderManager::binormal_cache[i - 6] = value; |
