mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 01:28:57 +00: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:
parent
55a465c6e6
commit
3a4d8379bf
3 changed files with 23 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue