From 99f4ea999c9e881e8119eeea3cf644c2a18b603e Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Sat, 1 Sep 2018 09:11:15 -0400 Subject: [PATCH] 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 --- src/video_core/renderer_opengl/gl_shader_gen.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 3464090a41..bae90e7729 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -1158,8 +1158,7 @@ float ProcTexNoiseCoef(vec2 x) { case ProcTexFilter::NearestMipmapLinear: case ProcTexFilter::NearestMipmapNearest: out += "lut_coord += lut_offset;\n"; - // Note: float->int conversion here is indeed floor, not round - out += "return texelFetch(texture_buffer_lut_rgba, int(lut_coord) + " + out += "return texelFetch(texture_buffer_lut_rgba, int(round(lut_coord)) + " "proctex_lut_offset);\n"; break; }