Fixed the map hud element being scaled down by the gui scale twice - #6624
Open
dekrom wants to merge 1 commit into
Open
Fixed the map hud element being scaled down by the gui scale twice#6624dekrom wants to merge 1 commit into
dekrom wants to merge 1 commit into
Conversation
Collaborator
|
rendering issues should always be tested ingame |
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.
Type of change
Description
Since e437397 ("26.2 update", #6439),
HudRenderer#beginpushes the gui scale onto the poseitself:
and
end()runs the post tasks before it pops that matrix, so the scale is still live insidethem.
MapHudapplies1f / getGuiScale()a second time inside its own post task, which wascorrect when the element was added in ac05a1a (#5950) because
begin(DrawContext)did nottouch the pose back then.
The result is that both the map and the
translate(this.x, this.y)that positions it getdivided by the gui scale twice. At gui scale 3 the map draws at roughly 43x43 px in the corner
of a 128x128 box, and the background quad and the hud editor outline are still drawn in real
pixels at the right place, so the element cannot be lined up with anything.
Dropping the extra scale leaves the post task in the same coordinate space every other element
already uses.
Related issues
None that I found.
How Has This Been Tested?
Not reproduced in game yet, this came out of reading the render path:
begin()pushesscale(1 / guiScale)andend()runs the post tasks before it pops that matrix, so the elementis scaled twice. Builds clean against current master.
Checklist: