mojira.dev

gudenau

Assigned

No issues.

Reported

MC-267216 Greedy meshing Invalid MC-266936 Snow layers prevent saplings from growing into trees Community Consensus MC-264748 GLX._initGlfw Treats Pointer as a String Fixed MC-184439 Update To Newer LTS JVM Invalid WEB-1400 Skin Uploader Scrubs Chunks Invalid MC-111254 Fullscreen Disables Window Resize Duplicate

Comments

I don't believe so, but it is a minor issue that may make debugging issues related to the windowing system harder.

This is a pretty easy thing to fix, it's a two line change.

Using fabric names, in net.minecraft.client.textyre.Sprite$Interpolation.apply()V it does:

for(int y = 0; y < n; ++y) {
  for(int x = 0; x < m; ++x) {
    int dest = getPixelColor(i, l, x, y);
    int source = getPixelColor(k, l, x, y);
    int red = lerp(delta, dest >> 16 & 255, source >> 16 & 255);
    int green = lerp(delta, dest >> 8 & 255, source >> 8 & 255);
    int blue = lerp(delta, dest & 255, source & 255);
    images[l].setPixelColor(x, y, (source & 0xFF000000 ) | (red << 16) | (green << 8) | blue);
  }
}

And a fixed version would be as follows:

for(int y = 0; y < n; ++y) {
  for(int x = 0; x < m; ++x) {
    int dest = getPixelColor(i, l, x, y);
    int source = getPixelColor(k, l, x, y);
    int red = lerp(delta, dest >> 16 & 255, source >> 16 & 255);
    int green = lerp(delta, dest >> 8 & 255, source >> 8 & 255);
    int blue = lerp(delta, dest & 255, source & 255);
    int alpha = lerp(delta, (dest >>> 24) & 255, (source >>> 24) & 255);
    images[l].setPixelColor(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);
  }
}

The change is more specifically:

images[l].setPixelColor(x, y, (source & 0xFF000000 ) | (red << 16) | (green << 8) | blue);

becomes

int alpha = lerp(delta, (dest >>> 24) & 255, (source >>> 24) & 255);
images[l].setPixelColor(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);

It is because the alpha was always being used from the "source" texture of the interpolation pass. This makes it so the alpha is always interpolated.

I would argue that this is a bug, the implemented PNG scrubbing is being to aggressive.

However, I will make a request of the feedback site as advised.

I checked the LWJGL patch that fixed this issue on there end. It appears that you would need to set the window to resizable after exiting full screen, at least on Windows hosts.

Source.

I can confirm that this is a LWJGL bug though, the Windows backbend doesn't properly setup the window with the current state of the Display class. Hence why you need to make it not resizable to clear the window state in the backbend, this clears the cache and allows the backend to set the resizable flag on the window.

I also made a quick mod and put it on Curse. "Fullscreen Fix"

The way to fix this is to make the Display resizable after you set fullscreen.
{{
Display.setFullscreen(fullscreen);
Display.setResizable(false);
Display.setResizable(true);
}}
It needs to be set to false first because the implementation caches the last value and will not update the Window if it is already resizable in the cached state.

@SunCat I did not find that when I searched, sorry about that.

Screenshot of the problem.

Same on 1.8.8 and 15w39b.