rsx: Significantly reduce the applied subpixel bias when handling unnormalized access

- If a large value is set (e.g 0.5) rounding will sample 'up' and we can read the wrong texel
This commit is contained in:
kd-11 2021-08-09 19:53:25 +03:00 committed by kd-11
parent 7fdbadf645
commit c9afb3daaa

View file

@ -1907,8 +1907,9 @@ namespace rsx
if (tex.min_filter() == rsx::texture_minify_filter::nearest ||
tex.mag_filter() == rsx::texture_magnify_filter::nearest)
{
// Subpixel offset so that (X + bias) * scale will round correctly
current_fragment_program.texture_params[i].subpixel_bias = 0.5f;
// Subpixel offset so that (X + bias) * scale will round correctly.
// This is done to work around fdiv precision issues in some GPUs (NVIDIA)
current_fragment_program.texture_params[i].subpixel_bias = 0.01f;
}
}