Fix "Colormatic" splash text rendering as single color#1017
Open
ayushthoren wants to merge 1 commit intosmartcmd:mainfrom
Open
Fix "Colormatic" splash text rendering as single color#1017ayushthoren wants to merge 1 commit intosmartcmd:mainfrom
ayushthoren wants to merge 1 commit intosmartcmd:mainfrom
Conversation
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A font rendering bug would cause the last color code in a string to apply to the whole thing.
Changes
Previous Behavior
The Colormaitc splash (
§1C§2o§3l§4o§5r§6m§7a§8t§9i§ac) rendered in one flat color instead of showing per-segment colors.Root Cause
Font::drawput all glyphs together in the same tesselator batch while handling§color codes. Because the batch was not flushed on color transitions, earlier glyphs did not preserve their intended colors.New Behavior
Splash strings containing
§color codes now render with the correct per-segment colors.Fix Implementation
In
Minecraft.Client/Font.cpp, when a valid color code is parsed inFont::draw, the renderer now:glColor3f.This ensures previous glyphs keep their original color and new ones use the updated color.
AI Use Disclosure
I did not use AI to fix this issue.
Related Issues
How it looked before:
How it looks after: