mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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:
@ -332,6 +332,13 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& ho
|
||||
if (texinfo.inputform == TexInputForm::AB11)
|
||||
out.Write("coord.z = 1.0;\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");
|
||||
|
||||
// first transformation
|
||||
switch (texinfo.texgentype)
|
||||
{
|
||||
|
Reference in New Issue
Block a user