rsx/fp: improve SRC modifier order

- Neg modifier is applied after clamping. Abs has not been tested/proven so precision clamp goes first now, not last
This commit is contained in:
kd-11 2017-11-17 19:43:57 +03:00
parent a8c0dd649e
commit f5addbf751

View file

@ -398,9 +398,10 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
if (strncmp(swizzle.c_str(), f, 4) != 0) ret += "." + swizzle;
//Warning: Modifier order matters. e.g neg should be applied after precision clamping (tested with Naruto UNS)
if (src1.input_prec_mod) ret = ClampValue(ret, src1.input_prec_mod);
if (src.abs) ret = "abs(" + ret + ")";
if (src.neg) ret = "-" + ret;
if (src1.input_prec_mod) ret = ClampValue(ret, src1.input_prec_mod);
return ret;
}