mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
This commit is contained in:
2 files changed
+16
-3
No files matched your search
@@ -1,5 +1,17 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -96,6 +_,11 @@
|
||||
BLEND.mode.enable();
|
||||
}
|
||||
|
||||
+ public static boolean _getBlendState() {
|
||||
+ RenderSystem.assertOnRenderThread();
|
||||
+ return BLEND.mode.enabled;
|
||||
+ }
|
||||
+
|
||||
public static void _blendFunc(int p_84329_, int p_84330_) {
|
||||
RenderSystem.assertOnRenderThread();
|
||||
if (p_84329_ != BLEND.srcRgb || p_84330_ != BLEND.dstRgb) {
|
||||
@@ -493,9 +_,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,8 +_,11 @@
|
||||
@@ -350,8 +_,12 @@
|
||||
public void processBlurEffect(float p_333718_) {
|
||||
float f = (float)this.minecraft.options.getMenuBackgroundBlurriness();
|
||||
if (this.blurEffect != null && f >= 1.0F) {
|
||||
+ boolean previousBlendState = GlStateManager._getBlendState();
|
||||
+ // FORGE: Blending the blur was removed in 1.21. This is necessary for screen layering to work properly. https://github.com/MinecraftForge/MinecraftForge/issues/10114
|
||||
+ RenderSystem.enableBlend();
|
||||
+ RenderSystem.disableBlend();
|
||||
this.blurEffect.setUniform("Radius", f);
|
||||
this.blurEffect.process(p_333718_);
|
||||
+ RenderSystem.disableBlend();
|
||||
+ if (previousBlendState) RenderSystem.enableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user