Skip to content

Commit

Permalink
Fix blur effect rendered at high z with depth test breaking subsequen…
Browse files Browse the repository at this point in the history
…t rendering of screen elements (#1741)
  • Loading branch information
XFactHD authored Dec 6, 2024
1 parent cc9dfb4 commit 91b27b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion patches/net/minecraft/client/gui/screens/Screen.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,19 @@
}

@Override
@@ -354,6 +_,7 @@
@@ -354,9 +_,12 @@

this.renderBlurredBackground(p_294317_);
this.renderMenuBackground(p_283688_);
+ net.neoforged.neoforge.common.NeoForge.EVENT_BUS.post(new net.neoforged.neoforge.client.event.ScreenEvent.BackgroundRendered(this, p_283688_));
}

protected void renderBlurredBackground(float p_330683_) {
+ // Neo: fix blur effect rendered at high z with depth test breaking subsequent rendering of screen elements (https://github.com/neoforged/NeoForge/issues/1504)
+ RenderSystem.disableDepthTest();
this.minecraft.gameRenderer.processBlurEffect(p_330683_);
this.minecraft.getMainRenderTarget().bindWrite(false);
}
@@ -467,6 +_,10 @@
public void onFilesDrop(List<Path> p_96591_) {
}
Expand Down

0 comments on commit 91b27b7

Please sign in to comment.