summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2018-10-09 08:54:17 +0100
committerGitHub <noreply@github.com>2018-10-09 08:54:17 +0100
commitbb6aff1d78ec325d0e5889821cd7f9be5b17d27d (patch)
tree27ea67ace40234c2bd47c3d3f7f47d3c4d8ae320 /Source/Core/VideoCommon/PixelShaderGen.cpp
parent31594a81388d08f4989cf7031062d023b78f88ed (diff)
parent56fdcf5f00a8066617ae738652ab041614b0938a (diff)
Merge pull request #7456 from Tilka/drop_floor
VideoCommon: remove unnecessary floor()
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 7ba5edba7f..5271d31671 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -1354,7 +1354,7 @@ static void WriteFog(ShaderCode& out, const pixel_shader_uid_data* uid_data)
out.SetConstantsUsed(C_FOGF, C_FOGF);
out.Write("\tfloat offset = (2.0 * (rawpos.x / " I_FOGF ".w)) - 1.0 - " I_FOGF ".z;\n");
out.Write("\tfloat floatindex = clamp(9.0 - abs(offset) * 9.0, 0.0, 9.0);\n");
- out.Write("\tuint indexlower = uint(floor(floatindex));\n");
+ out.Write("\tuint indexlower = uint(floatindex);\n");
out.Write("\tuint indexupper = indexlower + 1u;\n");
out.Write("\tfloat klower = " I_FOGRANGE "[indexlower >> 2u][indexlower & 3u];\n");
out.Write("\tfloat kupper = " I_FOGRANGE "[indexupper >> 2u][indexupper & 3u];\n");