Only pass positive values to sqrt and log2 in the fragment program. (#2624)

This commit is contained in:
Jochen Schleu 2017-04-03 12:17:20 +02:00 committed by kd-11
parent 215a9f9e11
commit ce7d62968e

View File

@ -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)