[PR #5592] [MERGED] Draw the Mojang Studios logo on the loading overlay #6373

Closed
opened 2026-11-03 06:19:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5592
Author: @rdbtCVS
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/5115-mojang-studios-logo


📝 Commits (1)

  • 840ea9e Draw the Mojang Studios logo on the loading overlay

📊 Changes

1 file changed (+91 additions, -9 deletions)

View changed files

📝 crates/horizon-client-render/src/level_loading.rs (+91 -9)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally.

The loading overlay (startup, and every resource pack reload) filled the Mojang red / dark background but never drew the logo vanilla's LoadingOverlay shows.

What changed (crates/horizon-client-render/src/level_loading.rs, draw_loading_overlay), following 26.3's LoadingOverlay.extractRenderState and extractProgressBar (read from the bytecode with rea_vanilla.py):

  • The logo textures/gui/title/mojangstudios.png is drawn as its two halves side by side, as vanilla blits it: logoHeight = min(guiWidth * 0.75, guiHeight) * 0.25, each half 2 * logoHeight wide, centred; the left half samples the texture's top half from u = −0.0625/120, the right half its bottom half from u = +0.0625/120 (clamped, as the logo's own sampler clamps). The texture comes from the player's own prepared resources: the GUI atlas already packs gui/title/*, nothing is committed.
  • The progress bar is vanilla's: a white 1 px border with a 2 px inset fill, as wide as the logo, at 83.25% of the height. Horizon's old bar sat at centre − 38, which a full-size logo covers.
  • Horizon's stage line ("Loading resources" and so on) stays, now just above the bar.

The startup screen isn't meant to show Horizon branding: draw_loading_overlay already filled BRAND_BACKGROUND and honoured darkMojangStudiosBackground, and docs/design-system.md has nothing on it. So both the startup and the pack-reload overlay now show the logo.

Not ported, and left as before: the 0.5 s fade-in on a pack reload, the 1 s fade-out once loading is done, and the bar's currentProgress smoothing. Horizon's overlay has no state between frames and just disappears when loading finishes. Vanilla's MOJANG_LOGO pipeline blends the logo additively (SRC_ALPHA, ONE). Here it uses the normal alpha blend instead: the texels are pure white, so the two only differ on the red channel of the logo's soft edges, by 16/255 at most.

Fixes #5115

Tests

  • New unit test level_loading::tests::the_mojang_logo_is_a_quarter_of_the_shorter_side_and_four_times_as_wide checks the layout math.
  • cargo test -p horizon-client-render --lib level_loading: 12 passed.
  • cargo clippy -p horizon-client-render --all-targets -- -D warnings: clean. cargo fmt --all --check: clean.
  • Not run: tools/pr_ready.py --quick, which would also run horizon-client's whole test suite, and an in-game screenshot (the overlay only shows for a moment).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5592 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5115-mojang-studios-logo` --- ### 📝 Commits (1) - [`840ea9e`](https://github.com/horizon-rust/horizon/commit/840ea9e89f4921c083394113e8af50c0e5c72a93) Draw the Mojang Studios logo on the loading overlay ### 📊 Changes **1 file changed** (+91 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/level_loading.rs` (+91 -9) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. The loading overlay (startup, and every resource pack reload) filled the Mojang red / dark background but never drew the logo vanilla's `LoadingOverlay` shows. **What changed** (`crates/horizon-client-render/src/level_loading.rs`, `draw_loading_overlay`), following 26.3's `LoadingOverlay.extractRenderState` and `extractProgressBar` (read from the bytecode with `rea_vanilla.py`): - The logo `textures/gui/title/mojangstudios.png` is drawn as its two halves side by side, as vanilla blits it: `logoHeight = min(guiWidth * 0.75, guiHeight) * 0.25`, each half `2 * logoHeight` wide, centred; the left half samples the texture's top half from u = −0.0625/120, the right half its bottom half from u = +0.0625/120 (clamped, as the logo's own sampler clamps). The texture comes from the player's own prepared resources: the GUI atlas already packs `gui/title/*`, nothing is committed. - The progress bar is vanilla's: a white 1 px border with a 2 px inset fill, as wide as the logo, at 83.25% of the height. Horizon's old bar sat at centre − 38, which a full-size logo covers. - Horizon's stage line ("Loading resources" and so on) stays, now just above the bar. The startup screen isn't meant to show Horizon branding: `draw_loading_overlay` already filled `BRAND_BACKGROUND` and honoured `darkMojangStudiosBackground`, and docs/design-system.md has nothing on it. So both the startup and the pack-reload overlay now show the logo. Not ported, and left as before: the 0.5 s fade-in on a pack reload, the 1 s fade-out once loading is done, and the bar's `currentProgress` smoothing. Horizon's overlay has no state between frames and just disappears when loading finishes. Vanilla's `MOJANG_LOGO` pipeline blends the logo additively (`SRC_ALPHA, ONE`). Here it uses the normal alpha blend instead: the texels are pure white, so the two only differ on the red channel of the logo's soft edges, by 16/255 at most. Fixes #5115 **Tests** - New unit test `level_loading::tests::the_mojang_logo_is_a_quarter_of_the_shorter_side_and_four_times_as_wide` checks the layout math. - `cargo test -p horizon-client-render --lib level_loading`: 12 passed. - `cargo clippy -p horizon-client-render --all-targets -- -D warnings`: clean. `cargo fmt --all --check`: clean. - Not run: `tools/pr_ready.py --quick`, which would also run horizon-client's whole test suite, and an in-game screenshot (the overlay only shows for a moment). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:19:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6373
No description provided.