mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
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:
parent
a8c0dd649e
commit
f5addbf751
1 changed files with 2 additions and 1 deletions
|
@ -398,9 +398,10 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
|
||||||
|
|
||||||
if (strncmp(swizzle.c_str(), f, 4) != 0) ret += "." + swizzle;
|
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.abs) ret = "abs(" + ret + ")";
|
||||||
if (src.neg) ret = "-" + ret;
|
if (src.neg) ret = "-" + ret;
|
||||||
if (src1.input_prec_mod) ret = ClampValue(ret, src1.input_prec_mod);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue