This issue dates back to 25w44a, which introduced Anisotropic Filtering.
The issue is present regardless of mipmap aswell as Anisotropic Filtering settings.
However, it might also be related to the fix for MC-300642.
The bug
All textures on blocks' faces handled by the terrain shaders are sampled incorrectly, which leads to obvious interpolated pixel edges. This seems to be the case on all devices and on versions 25w44a and later.
For example it doesn’t apply to:
Blocks in the GUI
Entities
Block entities
And so on.
Steps to reproduce
Take a screenshot
Zoom in to the image using a viewer with no filtering, i.e. nearest-neighbor scaling
Look at the edge between texture pixels within any block face (which will be blurry if the bug is present) and make sure to look inside the block face, not on its boundary
Expected result
Performing these same steps in versions prior to 25w44a, one would observe no blurred edges.
Additional information
The handling of texelOffset and texelCenter may be problematic.
In version 25w45a, this alternate implementation of sampleNearest seems to work well at short and long distances, but has not been thoroughly tested for potential issues:
vec4 sampleNearest(sampler2D sampler, vec2 uv, vec2 pixelSize) {
// Figure out how big a texel is on the screen, more or less
vec2 du = dFdx(uv);
vec2 dv = dFdy(uv);
// Convert our UV back up to texel coordinates and find out how far over we are from the center of each pixel
vec2 uvTexelCoords = uv / pixelSize;
vec2 texelCenter = round(uvTexelCoords + 0.5f) - 0.5f;
vec2 texelOffset = uvTexelCoords - texelCenter;
// Move our offset closer to the texel center based on texel size on screen
texelOffset = clamp(texelOffset * pixelSize, -abs(du) * 0.5 - abs(dv) * 0.5, abs(du) * 0.5 + abs(dv) * 0.5);
uv = (texelCenter) * pixelSize + texelOffset;
return textureGrad(sampler, uv, du, dv);
}
The corresponding changes have also been tested on the latest snapshot, and seem to work.
Thank you for helping us improve Minecraft! We saved your files: