Blur+

Blur+

16M Downloads

Causing funny ui issues with journeymap.

mysticdrew opened this issue ยท 4 comments

commented

So, I draw screens on top of each other with a z translation of 2000.
With your mod installed, it does this.
java_PBrZLGrGQS

it should look like this.
image

This is my layering logic
https://github.com/TeamJM/journeymap-api/blob/56b6778a4bfebfee80ed10673988ee5809b5bfe4/common/src/main/java/journeymap/api/v2/client/ui/component/LayeredScreen.java#L47

I am curious what you are doing that is causing this? I can increase the z translation to 2001 and it fixes it. But, that only fixes it on my end with my mod. This is likely causing compatibility issues with other mods too, so we should come up with a solution that fix it at the source.

commented

After looking into this, it seems like my screen change detection system is unable to handle the fact that you're rendering two screens at the same time.
Any time the render method of a screen is called, Blur+ does a few checks to find out whether the current screen has blur and a background, or not. This is needed for fade in/out effects.
Unfortunately, I have to do it this way, as screens do not have these properties explicitly declared.

https://github.com/Motschen/Blur/blob/plus-1.21.4/common/src/main/java/eu/midnightdust/blur/mixin/MixinScreen.java#L27

When a screen change is detected and the new screen (in this case your layered one) does not appear to have blur, the fade out effect manually renders blur and writes the framebuffer, which is likely the cause of the text glitching:
https://github.com/Motschen/Blur/blob/plus-1.21.4/common/src/main/java/eu/midnightdust/blur/Blur.java#L33

commented

I'll see if I can find a solution that keeps the current behavior while taking nested screens into account.

commented

With the latest version, we do not call minecraft.setScreen if there is a background screen.
We only call it if there is not background screen.
https://github.com/TeamJM/journeymap-api/blob/ead352fed7e8e2d7c23fbf89bafde305064c98dd/common/src/main/java/journeymap/api/v2/client/ui/component/LayeredScreen.java#L21-L30

That might be helpful.

This layered screen mimics a lot of what the vanilla RealmsPopupScreen does. I imagine other mods use a similar thing if they layer screens.

commented

Similar behavior in Legacy4J for adding an server.
Image

This is an serious issue when it comes to UI Readability, hope this can get fixed.