[PR #6815] [MERGED] fix(hud): linearly sample credits vignette to prevent flickering #7111

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6815
Author: @abit-foggy
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/credits-vignette-flicker


📝 Commits (1)

  • cb38e97 fix(hud): linearly sample credits vignette to prevent flickering

📊 Changes

2 files changed (+24 additions, -1 deletions)

View changed files

📝 crates/horizon-client-render/src/hud.rs (+17 -1)
📝 crates/horizon-client-render/src/hud.wgsl (+7 -0)

📄 Description

🤖 Opened by abit-foggy's AI agent (Antigravity), not by abit-foggy personally.

What and why

The credits vignette (misc/credits_vignette) specifies "blur": true in its .png.mcmeta and receives a 1-texel wrapped border when packed into HudAtlas.

Previously, vignette_pipeline in hud.rs reused the generic fs_main fragment shader with the nearest-neighbor atlas_sampler. Because the 256×256 vignette texture was stretched fullscreen and sampled with nearest filtering without edge clamping, subpixel rasterization across frames caused the UV sampling coordinates to jitter between adjacent texels and flicker against the scrolling background.

This adds a linear sampler (linear_sampler) to the HUD resource bind group and a dedicated fs_vignette fragment shader in hud.wgsl to sample the vignette bilinearly, matching the behavior of the camera vignette in screen.wgsl.

Kind

  • bug: a crash or a breakage
  • parity: Horizon now does what vanilla 26.3 does
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

WinScreen.extractVignette: in vanilla Java Edition, credits_vignette.png is drawn with bilinear filtering (blur: true in mcmeta).

Other projects' code

none

Testing

  • cargo check -p horizon-client-render -p horizon-client (clean)
  • cargo test -p horizon-client-render hud (53 passed)
  • cargo test -p horizon-client-lib win_screen (6 passed)
  • cargo clippy -p horizon-client-render -p horizon-client -- -D warnings (clean)
  • cargo fmt --check (clean)
  • In-game verification: launched client and verified smooth, flicker-free vignette on the credits and attributions screens.

🤖 Generated with Antigravity


🔄 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/6815 **Author:** [@abit-foggy](https://github.com/abit-foggy) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/credits-vignette-flicker` --- ### 📝 Commits (1) - [`cb38e97`](https://github.com/horizon-rust/horizon/commit/cb38e971c61e0da4e0a7d26e29d55353c413776b) fix(hud): linearly sample credits vignette to prevent flickering ### 📊 Changes **2 files changed** (+24 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/hud.rs` (+17 -1) 📝 `crates/horizon-client-render/src/hud.wgsl` (+7 -0) </details> ### 📄 Description > 🤖 Opened by abit-foggy's AI agent (Antigravity), not by abit-foggy personally. ## What and why The credits vignette (`misc/credits_vignette`) specifies `"blur": true` in its `.png.mcmeta` and receives a 1-texel wrapped border when packed into `HudAtlas`. Previously, `vignette_pipeline` in `hud.rs` reused the generic `fs_main` fragment shader with the nearest-neighbor `atlas_sampler`. Because the 256×256 vignette texture was stretched fullscreen and sampled with nearest filtering without edge clamping, subpixel rasterization across frames caused the UV sampling coordinates to jitter between adjacent texels and flicker against the scrolling background. This adds a linear sampler (`linear_sampler`) to the HUD resource bind group and a dedicated `fs_vignette` fragment shader in `hud.wgsl` to sample the vignette bilinearly, matching the behavior of the camera vignette in `screen.wgsl`. ## Kind - [x] bug: a crash or a breakage - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `WinScreen.extractVignette`: in vanilla Java Edition, `credits_vignette.png` is drawn with bilinear filtering (`blur: true` in mcmeta). ## Other projects' code none ## Testing - `cargo check -p horizon-client-render -p horizon-client` (clean) - `cargo test -p horizon-client-render hud` (53 passed) - `cargo test -p horizon-client-lib win_screen` (6 passed) - `cargo clippy -p horizon-client-render -p horizon-client -- -D warnings` (clean) - `cargo fmt --check` (clean) - In-game verification: launched client and verified smooth, flicker-free vignette on the credits and attributions screens. 🤖 Generated with [Antigravity](https://deepmind.google/technologies/antigravity) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:34:00 +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#7111
No description provided.