Skip to content

bug: Core shader breaks global text/bitmap colors (TAB & Custom Font compatibility) #479

Open

Description

@gummiangler

There is a compatibility issue with the plugin's core shaders that breaks the rendering of other custom fonts, bitmap images, and tablist plugins (like TAB or ItemsAdder). When the BetterHUD resource pack is active, custom bitmap characters outside of BetterHUD become completely gray, distorted, or incorrectly shaded, even if those specific characters are not used or overwritten by BetterHUD.

Cause:
In rendertype_text.vsh (and text.vsh), the lightmap color multiplication is applied globally to all text rendered by Minecraft:

vertexColor = Color * texelFetch(Sampler2, UV2 / 16, 0);

Because this happens globally outside of the conditional BetterHUD element checks, it overrides and breaks vanilla/custom font shading for the entire client.

Steps to Reproduce:

  1. Install BetterHUD and a plugin that uses custom bitmap fonts in the tablist (e.g., TAB with a server logo).

  2. Activate the BetterHUD resource pack.

  3. Observe that the tablist logo loses its original colors and turns gray/black.

  4. Disable the BetterHUD plugin (but keep the resource pack loaded): the issue persists because it is hardcoded into the shader.

Proposed Solution:
Revert the global vertexColor definition back to the Minecraft vanilla default, as BetterHUD already recalculates its own elements further down in the switch(id) block anyway.

Change line 46 in rendertype_text.vsh:

// Change this:
vertexColor = Color * texelFetch(Sampler2, UV2 / 16, 0);

// To this:
vertexColor = Color;

Testing this fix restores perfect compatibility with other font/UI plugins without breaking BetterHUD's actual functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions