VertexShaderManager: Explicitly use floating-point variant of abs.

Some compilers don't have an automatic abs() overload for floats.
Doesn't really matter if they use the integer variant here, but
it's better to be explicit about the fact that we're using floats.
This commit is contained in:
Jules Blok 2016-09-01 17:23:07 +02:00
parent ec428756a6
commit 376cadb862
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ void VertexShaderManager::SetConstants()
// where the console also uses reversed depth with the same accuracy. We need
// to make sure the depth range is positive here and then reverse the depth in
// the backend viewport.
constants.pixelcentercorrection[2] = abs(xfmem.viewport.zRange) / 16777215.0f;
constants.pixelcentercorrection[2] = fabs(xfmem.viewport.zRange) / 16777215.0f;
if (xfmem.viewport.zRange < 0.0f)
constants.pixelcentercorrection[3] = xfmem.viewport.farZ / 16777215.0f;
else