Skip to content

Commit

Permalink
Reset shader colour after modifying it
Browse files Browse the repository at this point in the history
This fixes the colour "bleeding" to where it's unwanted.
  • Loading branch information
Juuxel committed May 7, 2023
1 parent 692d106 commit c310f7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ abstract class PalettedMenuScreen<M>(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) {
Expand Down

0 comments on commit c310f7c

Please sign in to comment.