mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't.
This commit is contained in:
parent
fa77e1d2b6
commit
1b3b12caa0
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue