1
0
Fork 0

gl_rasiterzer/proctex: revert back to round() for Nearest sampling

This change to floor() was made in 2927c88, which was a result of doing some hwtest. It turned out that it was buggy edge cases in PICA, and for most cases round() still applies
This commit is contained in:
Weiyi Wang 2018-09-01 09:11:15 -04:00
parent b4fdce0c2c
commit 99f4ea999c
1 changed files with 1 additions and 2 deletions

View File

@ -1158,8 +1158,7 @@ float ProcTexNoiseCoef(vec2 x) {
case ProcTexFilter::NearestMipmapLinear: case ProcTexFilter::NearestMipmapLinear:
case ProcTexFilter::NearestMipmapNearest: case ProcTexFilter::NearestMipmapNearest:
out += "lut_coord += lut_offset;\n"; out += "lut_coord += lut_offset;\n";
// Note: float->int conversion here is indeed floor, not round out += "return texelFetch(texture_buffer_lut_rgba, int(round(lut_coord)) + "
out += "return texelFetch(texture_buffer_lut_rgba, int(lut_coord) + "
"proctex_lut_offset);\n"; "proctex_lut_offset);\n";
break; break;
} }