mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
workaround for division by zero on fog calculation
This commit is contained in:
@ -1322,6 +1322,8 @@ static void WriteFog(char *&p)
|
||||
// perspective
|
||||
// ze = A/(B - (Zs >> B_SHF)
|
||||
WRITE (p, "\tfloat ze = " I_FOG"[1].x / (" I_FOG"[1].y - (zCoord / " I_FOG"[1].w));\n");
|
||||
WRITE (p, "\tif(isnan(ze))\n"); // TODO: on intel/mesa, here will be a division by zero
|
||||
WRITE (p, "\t\tze = 0.0f;\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user