mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Convert NaN to 1 when generating texture coordinates
This fixes eyelids in Shadow the Hedgehog during cutscenes (https://bugs.dolphin-emu.org/issues/11458)
This commit is contained in:
@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user