From c310f7cb884baf9264adddb1ccc141c9d8890027 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 7 May 2023 13:25:00 +0300 Subject: [PATCH] Reset shader colour after modifying it This fixes the colour "bleeding" to where it's unwanted. --- .../juuxel/adorn/client/gui/screen/AbstractConfigScreen.kt | 2 ++ .../kotlin/juuxel/adorn/client/gui/screen/PalettedMenuScreen.kt | 1 + 2 files changed, 3 insertions(+) diff --git a/common/src/main/kotlin/juuxel/adorn/client/gui/screen/AbstractConfigScreen.kt b/common/src/main/kotlin/juuxel/adorn/client/gui/screen/AbstractConfigScreen.kt index 999f5c9e8..fc9ccee7a 100644 --- a/common/src/main/kotlin/juuxel/adorn/client/gui/screen/AbstractConfigScreen.kt +++ b/common/src/main/kotlin/juuxel/adorn/client/gui/screen/AbstractConfigScreen.kt @@ -63,6 +63,8 @@ abstract class AbstractConfigScreen(title: Text, private val parent: Screen) : S drawTexture(matrices, 0, 0, HEART_SIZE, HEART_SIZE, 0f, 0f, 8, 8, 8, 8) matrices.pop() } + + RenderSystem.setShaderColor(1f, 1f, 1f, 1f) } override fun close() { diff --git a/common/src/main/kotlin/juuxel/adorn/client/gui/screen/PalettedMenuScreen.kt b/common/src/main/kotlin/juuxel/adorn/client/gui/screen/PalettedMenuScreen.kt index c9755da29..5094b090e 100644 --- a/common/src/main/kotlin/juuxel/adorn/client/gui/screen/PalettedMenuScreen.kt +++ b/common/src/main/kotlin/juuxel/adorn/client/gui/screen/PalettedMenuScreen.kt @@ -28,6 +28,7 @@ abstract class PalettedMenuScreen(menu: M, playerInventory: PlayerInventory, RenderSystem.setShaderColor(Colors.redOf(bg), Colors.greenOf(bg), Colors.blueOf(bg), 1.0f) RenderSystem.setShaderTexture(0, backgroundTexture) drawTexture(matrices, x, y, 0, 0, backgroundWidth, backgroundHeight) + RenderSystem.setShaderColor(1f, 1f, 1f, 1f) } override fun drawForeground(matrices: MatrixStack, mouseX: Int, mouseY: Int) {