PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't.

This commit is contained in:
Tony Wasserka 2013-12-08 14:31:33 +01:00
parent fa77e1d2b6
commit 1b3b12caa0
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
// U24 overflow emulation
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");
}