PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't.
This commit is contained in:
parent
fa77e1d2b6
commit
1b3b12caa0
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue