diff options
author | Fourmisain <8464472+Fourmisain@users.noreply.github.com> | 2021-07-16 21:48:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 22:48:50 +0300 |
commit | c95d786fba6f378d793e4969931c1a735a78f442 (patch) | |
tree | 1ebd89a6095907acb0928bd482a1018d68caeadf /src/main/java | |
parent | 8e0570f3e6c87b835b3dd22a0f57744af7ae008d (diff) | |
download | LibGui-c95d786fba6f378d793e4969931c1a735a78f442.tar.gz LibGui-c95d786fba6f378d793e4969931c1a735a78f442.tar.bz2 LibGui-c95d786fba6f378d793e4969931c1a735a78f442.zip |
fix texturedRect() not blending transparent textures (#125)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/ScreenDrawing.java | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } /** |