From ce7d62968e75fbbbe4e01440c1da0cc747f4935b Mon Sep 17 00:00:00 2001 From: Jochen Schleu Date: Mon, 3 Apr 2017 12:17:20 +0200 Subject: [PATCH] Only pass positive values to sqrt and log2 in the fragment program. (#2624) --- rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp index 544b1dc7a8..5501217e58 100644 --- a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp @@ -173,7 +173,7 @@ std::string FragmentProgramDecompiler::NotZero(const std::string& code) std::string FragmentProgramDecompiler::NotZeroPositive(const std::string& code) { - return "max(" + code + ", 1.E-10)"; + return "max(abs(" + code + "), 1.E-10)"; } std::string FragmentProgramDecompiler::NoOverflow(const std::string& code)