mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
VideoCommon: Handle emboss texgen with only a single normal
Fixes a large number of effects in Rogue Squadron 2 and 3.
This commit is contained in:
parent
39b2854b98
commit
2a5c77f43f
14 changed files with 138 additions and 62 deletions
|
@ -127,6 +127,22 @@ int VertexLoaderX64::ReadVertex(OpArg data, VertexComponentFormat attribute, Com
|
|||
MOVUPS(MPIC(VertexLoaderManager::position_cache.data(), scratch3, SCALE_4), coords);
|
||||
SetJumpTarget(dont_store);
|
||||
}
|
||||
else if (native_format == &m_native_vtx_decl.normals[1])
|
||||
{
|
||||
TEST(32, R(remaining_reg), R(remaining_reg));
|
||||
FixupBranch dont_store = J_CC(CC_NZ);
|
||||
// For similar reasons, the cached tangent and binormal are 4 floats each
|
||||
MOVUPS(MPIC(VertexLoaderManager::tangent_cache.data()), coords);
|
||||
SetJumpTarget(dont_store);
|
||||
}
|
||||
else if (native_format == &m_native_vtx_decl.normals[2])
|
||||
{
|
||||
CMP(32, R(remaining_reg), R(remaining_reg));
|
||||
FixupBranch dont_store = J_CC(CC_NZ);
|
||||
// For similar reasons, the cached tangent and binormal are 4 floats each
|
||||
MOVUPS(MPIC(VertexLoaderManager::binormal_cache.data()), coords);
|
||||
SetJumpTarget(dont_store);
|
||||
}
|
||||
};
|
||||
|
||||
int elem_size = GetElementSize(format);
|
||||
|
@ -217,7 +233,9 @@ int VertexLoaderX64::ReadVertex(OpArg data, VertexComponentFormat attribute, Com
|
|||
dest.AddMemOffset(sizeof(float));
|
||||
|
||||
// zfreeze
|
||||
if (native_format == &m_native_vtx_decl.position)
|
||||
if (native_format == &m_native_vtx_decl.position ||
|
||||
native_format == &m_native_vtx_decl.normals[1] ||
|
||||
native_format == &m_native_vtx_decl.normals[2])
|
||||
{
|
||||
if (cpu_info.bSSE4_1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue