mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 15:08:09 +02:00
softpipe: Fix anisotropic sampling aliasing bug
"Backport" of the llvmpip fix. Nearest sampling was being done using coordinates on texel boundaries, which caused aliasing bugs. Shift coordinates by half a texel to correct this. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31562>
This commit is contained in:
parent
5947e3d760
commit
e7a851e6cf
1 changed files with 2 additions and 2 deletions
|
|
@ -2444,8 +2444,8 @@ img_filter_2d_ewa(const struct sp_sampler_view *sp_sview,
|
|||
const float weight = weightLut[qClamped];
|
||||
|
||||
weight_buffer[buffer_next] = weight;
|
||||
s_buffer[buffer_next] = u / ((float) width);
|
||||
t_buffer[buffer_next] = v / ((float) height);
|
||||
s_buffer[buffer_next] = (u + 0.5f) / width;
|
||||
t_buffer[buffer_next] = (v + 0.5f) / height;
|
||||
|
||||
buffer_next++;
|
||||
if (buffer_next == TGSI_QUAD_SIZE) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue