summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/TransformUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/TransformUnit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp
index 71d33f33ed..bf56307025 100644
--- a/Source/Core/VideoBackends/Software/TransformUnit.cpp
+++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp
@@ -137,6 +137,15 @@ static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum,
}
}
+ // Convert NaNs to 1 - needed to fix eyelids in Shadow the Hedgehog during cutscenes
+ // See https://bugs.dolphin-emu.org/issues/11458
+ if (std::isnan(src.x))
+ src.x = 1;
+ if (std::isnan(src.y))
+ src.y = 1;
+ if (std::isnan(src.z))
+ src.z = 1;
+
const float* mat = &xfmem.posMatrices[srcVertex->texMtx[coordNum] * 4];
Vec3* dst = &dstVertex->texCoords[coordNum];