[PR #1249] [MERGED] Fix in-world menu background blur #3456

Closed
opened 2026-11-03 04:09:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1249
Author: @rdbtCVS
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: t3/fix-menu-background-blur


📝 Commits (1)

  • e7d42dc Fix in-world menu background blur

📊 Changes

4 files changed (+130 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+9 -4)
📝 crates/horizon-client/src/game/screens.rs (+46 -1)
📝 crates/horizon-client/src/gfx.rs (+15 -4)
📝 crates/horizon-client/src/hud.rs (+60 -2)

📄 Description

What and why

Opening in-world menus left the world sharp because menu blur was only enabled over the title panorama and loading screens. Enable the existing vanilla blur for Pause, Options, Statistics, Advancements, and World Options, respecting the blur-strength setting and its zero/off value.

Draw the underlying HUD before the blur, then draw the menu, toasts, and debug overlay afterward. Keep vanilla's exclusions for inventories, chat, death, command-block editing, the game-mode switcher, and the title screen; preserve Horizon-style menu behavior.

Related to #1233 (background blur).

Vanilla reference

Pinned Minecraft 26.3: Screen.extractBackground, Screen.extractBlurredBackground, Screen.isInGameUi, PauseScreen.extractBackground, and GuiGraphicsExtractor.blurBeforeThisStratum. Inspected through tools/rea_vanilla.py and the shipped client bytecode.

Regression tests cover the screen-specific blur policy and drawing both sides of the HUD blur boundary without losing, duplicating, or changing blend/depth runs.

Visual verification

Captured before/after screenshots in the running Rust client at 1280×720. Verified the pause menu and in-world Options blur the world; the pause menu also blurs the hotbar while its buttons stay sharp. Setting menuBackgroundBlurriness to 0 restores the sharp world and hotbar. Before/after comparison is available in the task.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 022600481, 11 min 26 s)

Check Result
Scope ✅ 4 files, +130 −11
Cargo.lock ✅ unchanged
Public tree ✅ (2 s)
Python tests ➖ no Python change
rustfmt ✅ (28 s)
clippy ✅ (1 min 23 s)
tests: horizon-client ✅ 1110 passed (9 min 17 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 279 affected, to run in CI (--quick): ambient_sound, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo, basic_feature, biome_chunk, biome_generation and 267 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 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/1249 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/fix-menu-background-blur` --- ### 📝 Commits (1) - [`e7d42dc`](https://github.com/horizon-rust/horizon/commit/e7d42dc9d077e93f1546732c803a427ab0ea3043) Fix in-world menu background blur ### 📊 Changes **4 files changed** (+130 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+9 -4) 📝 `crates/horizon-client/src/game/screens.rs` (+46 -1) 📝 `crates/horizon-client/src/gfx.rs` (+15 -4) 📝 `crates/horizon-client/src/hud.rs` (+60 -2) </details> ### 📄 Description ## What and why Opening in-world menus left the world sharp because menu blur was only enabled over the title panorama and loading screens. Enable the existing vanilla blur for Pause, Options, Statistics, Advancements, and World Options, respecting the blur-strength setting and its zero/off value. Draw the underlying HUD before the blur, then draw the menu, toasts, and debug overlay afterward. Keep vanilla's exclusions for inventories, chat, death, command-block editing, the game-mode switcher, and the title screen; preserve Horizon-style menu behavior. Related to #1233 (background blur). ## Vanilla reference Pinned Minecraft 26.3: `Screen.extractBackground`, `Screen.extractBlurredBackground`, `Screen.isInGameUi`, `PauseScreen.extractBackground`, and `GuiGraphicsExtractor.blurBeforeThisStratum`. Inspected through `tools/rea_vanilla.py` and the shipped client bytecode. Regression tests cover the screen-specific blur policy and drawing both sides of the HUD blur boundary without losing, duplicating, or changing blend/depth runs. ## Visual verification Captured before/after screenshots in the running Rust client at 1280×720. Verified the pause menu and in-world Options blur the world; the pause menu also blurs the hotbar while its buttons stay sharp. Setting `menuBackgroundBlurriness` to 0 restores the sharp world and hotbar. Before/after comparison is available in the task. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 022600481, 11 min 26 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +130 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (2 s) | | Python tests | ➖ no Python change | | rustfmt | ✅ (28 s) | | clippy | ✅ (1 min 23 s) | | tests: horizon-client | ✅ 1110 passed (9 min 17 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 279 affected, to run in CI (--quick): ambient_sound, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo, basic_feature, biome_chunk, biome_generation and 267 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:40 +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#3456
No description provided.