summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderARM64.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-04-13 22:03:34 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-04-22 16:54:38 -0700
commit2a5c77f43ff1d69e78f12f13435a38c5eb2ed854 (patch)
tree5fe9bb681e4b8d4471f7efee278c96a24556b33b /Source/Core/VideoCommon/VertexLoaderARM64.cpp
parent39b2854b981aadec1576254ad5e4d91dc21c9709 (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/VideoCommon/VertexLoaderARM64.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderARM64.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderARM64.cpp b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
index ab9ced5d8a..eff8a29993 100644
--- a/Source/Core/VideoCommon/VertexLoaderARM64.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderARM64.cpp
@@ -215,6 +215,20 @@ int VertexLoaderARM64::ReadVertex(VertexComponentFormat attribute, ComponentForm
m_float_emit.STR(128, coords, EncodeRegTo64(scratch2_reg), ArithOption(remaining_reg, true));
SetJumpTarget(dont_store);
}
+ else if (native_format == &m_native_vtx_decl.normals[1])
+ {
+ FixupBranch dont_store = CBNZ(remaining_reg);
+ MOVP2R(EncodeRegTo64(scratch2_reg), VertexLoaderManager::tangent_cache.data());
+ m_float_emit.STR(128, IndexType::Unsigned, coords, EncodeRegTo64(scratch2_reg), 0);
+ SetJumpTarget(dont_store);
+ }
+ else if (native_format == &m_native_vtx_decl.normals[2])
+ {
+ FixupBranch dont_store = CBNZ(remaining_reg);
+ MOVP2R(EncodeRegTo64(scratch2_reg), VertexLoaderManager::binormal_cache.data());
+ m_float_emit.STR(128, IndexType::Unsigned, coords, EncodeRegTo64(scratch2_reg), 0);
+ SetJumpTarget(dont_store);
+ }
native_format->components = count_out;
native_format->enable = true;