Architectury API (Fabric/Forge/NeoForge)

Architectury API (Fabric/Forge/NeoForge)

158M Downloads

Drawing a texture makes it bold on Fabric in ClientGuiEvent.RENDER_HUD

Picono435 opened this issue ยท 2 comments

commented

Code:

ClientGuiEvent.RENDER_HUD.register(((matrices, tickDelta) -> {
  RenderSystem.setShaderTexture(0, TEXTURE);
  RenderSystem.setShaderColor(1.0F, 0.5F, 0.0F, 1.0F);
  int x = MinecraftClient.getInstance().getWindow().getScaledWidth() / 2 - 25;
  DrawableHelper.drawTexture(matrices, x, 5, 50, 16, 0, 0, 200, 66, 200, 66);
}));

This:
image
Becomes this:
image

What is also weird is that it works just fine on Forge and in Fabric there are some frames where it goes back to normal, going to back to the weird state again quickly.

commented

You might have to set the shader manually as well to prevent any weird leakage from other render calls (so RenderSystem.setShader(GameRenderer::getPositionTexShader)), try to see if that helps

commented

That seems to fix it, thank you.