diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index 2168f6a376..f063db1ddb 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -285,7 +285,10 @@ vec4 sample_color(vec2 st, float q) t = c[0]; #endif - return trunc(t * 255.0f); + // The 0.05f helps to fix the overbloom of sotc + // I think the issue is related to the rounding of texture coodinate. The linear (from fixed unit) + // interpolation could be slightly below the correct one. + return trunc(t * 255.0f + 0.05f); } vec4 tfx(vec4 T, vec4 C) diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index 8cc8ba7a03..9c9570327c 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -1148,7 +1148,10 @@ static const char* tfx_fs_all_glsl = " t = c[0];\n" "#endif\n" "\n" - " return trunc(t * 255.0f);\n" + " // The 0.05f helps to fix the overbloom of sotc\n" + " // I think the issue is related to the rounding of texture coodinate. The linear (from fixed unit)\n" + " // interpolation could be slightly below the correct one.\n" + " return trunc(t * 255.0f + 0.05f);\n" "}\n" "\n" "vec4 tfx(vec4 T, vec4 C)\n"