diff options
| author | Léo Lam <leo@leolam.fr> | 2021-08-04 03:08:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-04 03:08:34 +0200 |
| commit | c9c5f7a89c3f9a678d893560c906f00263ceb9de (patch) | |
| tree | 052eb85dcbfa9c17c60124c56574a90fd425ab95 /Source/Core/VideoCommon/UberShaderVertex.cpp | |
| parent | 45cddda3bca164af6435e5b8bf1418a2fa391a26 (diff) | |
| parent | 3a4d8379bf16e61348dafc1750a8e4b65394f7a9 (diff) | |
Merge pull request #9928 from Pokechu22/shadow-the-hedgehog-eyelids-NaN
Convert NaN to 1 when generating texture coordinates
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderVertex.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/UberShaderVertex.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/UberShaderVertex.cpp b/Source/Core/VideoCommon/UberShaderVertex.cpp index c5a20f033c..5b02b1f989 100644 --- a/Source/Core/VideoCommon/UberShaderVertex.cpp +++ b/Source/Core/VideoCommon/UberShaderVertex.cpp @@ -435,6 +435,13 @@ static void GenVertexShaderTexGens(APIType api_type, u32 num_texgen, ShaderCode& out.Write(" coord.z = 1.0f;\n" "\n"); + // Convert NaNs to 1 - needed to fix eyelids in Shadow the Hedgehog during cutscenes + // See https://bugs.dolphin-emu.org/issues/11458 + out.Write(" // Convert NaN to 1\n"); + out.Write(" if (isnan(coord.x)) coord.x = 1.0;\n"); + out.Write(" if (isnan(coord.y)) coord.y = 1.0;\n"); + out.Write(" if (isnan(coord.z)) coord.z = 1.0;\n"); + out.Write(" // first transformation\n"); out.Write(" uint texgentype = {};\n", BitfieldExtract<&TexMtxInfo::texgentype>("texMtxInfo")); out.Write(" float3 output_tex;\n" |
