mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't.
This commit is contained in:
@ -590,7 +590,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
|||||||
|
|
||||||
// U24 overflow emulation
|
// U24 overflow emulation
|
||||||
out.Write("zCoord = zCoord * (16777215.0/16777216.0);\n");
|
out.Write("zCoord = zCoord * (16777215.0/16777216.0);\n");
|
||||||
out.Write("zCoord = frac(zCoord);\n");
|
out.Write("zCoord = zCoord - 2.0*round(0.5*zCoord);\n");
|
||||||
out.Write("zCoord = zCoord * (16777216.0/16777215.0);\n");
|
out.Write("zCoord = zCoord * (16777216.0/16777215.0);\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user