mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user