From c95d786fba6f378d793e4969931c1a735a78f442 Mon Sep 17 00:00:00 2001 From: Fourmisain <8464472+Fourmisain@users.noreply.github.com> Date: Fri, 16 Jul 2021 21:48:50 +0200 Subject: fix texturedRect() not blending transparent textures (#125) --- src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java index c1d17e0..0035d93 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java @@ -141,6 +141,7 @@ public class ScreenDrawing { Tessellator tessellator = Tessellator.getInstance(); BufferBuilder buffer = tessellator.getBuffer(); Matrix4f model = matrices.peek().getModel(); + RenderSystem.enableBlend(); RenderSystem.setShaderTexture(0, texture); RenderSystem.setShaderColor(r, g, b, opacity); RenderSystem.setShader(GameRenderer::getPositionTexShader); @@ -151,6 +152,7 @@ public class ScreenDrawing { buffer.vertex(model, x, y, 0).texture(u1, v1).next(); buffer.end(); BufferRenderer.draw(buffer); + RenderSystem.disableBlend(); } /** -- cgit