[PR #6455] [MERGED] Translucent batching (4/4): a switch in the graphics settings, on by default #6885

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

📋 Pull Request Information

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

Base: main ← Head: perf/translucent-batching-switch


📝 Commits (1)

  • 89c7d58 Graphics: a Translucent Batching switch, on by default

📊 Changes

5 files changed (+117 additions, -19 deletions)

View changed files

📝 crates/horizon-client-render/src/graphics.rs (+16 -10)
📝 crates/horizon-client-render/src/graphics_style.rs (+1 -1)
📝 crates/horizon-client-render/src/graphics_ui.rs (+94 -5)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+3 -0)
📝 docs/graphics.md (+3 -3)

📄 Description

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

What and why

Fixes #5983 (4 of 4).

Translucent Batching gets a switch and is turned on by default. It needs nothing else first: the arena (#5984), the
binding fix (#6181) and the shrinking of its large pages (#6337) are in.

  • The switch. Graphics: Advanced, Performance, after Graphics API: "Translucent Batching", tagged "Saves time"
    like Shadow Cache, with "Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start." It applies
    at the next start (or resource reload), as Graphics API does, and is no part of a preset.
  • Where the device can't batch (translucent_batching_offered: OpenGL, no indirect multi-draw, or vanilla frames
    drawn flat), the switch is greyed out and reads Off ("Your GPU or graphics API doesn't support it."),
    while the saved value waits for a device that can; a click, the wheel or Enter after a click leaves it alone. On
    macOS, where Metal draws flat and never offers it, it is hidden beside Graphics API.
  • On by default, under a new key. While it was off by default with no switch, every save of
    horizon-graphics.txt wrote translucentBatching:false, so under that key the new default would reach no one who
    has saved an option since #5984. The setting is now batchTranslucent; the old key stays ignored, as shaderPack
    is. A batchTranslucent:false turns it off.
  • Docs. The Performance row of the settings table and the Translucent batching paragraph: where the switch is,
    the default, what it gains and costs.

Checked in game (this commit on the base it was written on, before #6337 merged; rebasing it onto main changed nothing in it; 1920x1080, offscreen, ocean at render distance 16): with no setting it is on (11 draw calls a frame); with only the old translucentBatching:false it is still on (5); with batchTranslucent:false it is off (79). The switch reads On under Performance, after Graphics API, and its label fits. No validation errors.

Tests. graphics_ui.rs translucent_batching_is_an_advanced_switch_where_the_device_can: on Advanced and not
Simple, on by default, a click switches it and keeps the preset; where the device can't, it reads Off and neither a
click nor Enter after it does anything (no sound, no change, no save). graphics.rs: the round trip, the default,
batchTranslucent:false, and the old key ignored. The three new strings are in en_us.json only; the other
languages fall back to English for now.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • 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

Horizon-only: vanilla draws translucent sections one by one. The picture stays vanilla's.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-4R7C0FC, against upstream/main at ed102e059, 5 min 7 s)

Check Result
Scope ✅ 5 files, +117 −19
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (1 min 34 s)
rustfmt ✅ (9 s)
clippy ✅ (56 s)
tests: horizon-client-lib, horizon-client-render ✅ 2288 passed (2 min 21 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Screenshots

No screenshot attached: the menu shows Mojang's textures.

🤖 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/6455 **Author:** [@NerfPhaselock](https://github.com/NerfPhaselock) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/translucent-batching-switch` --- ### 📝 Commits (1) - [`89c7d58`](https://github.com/horizon-rust/horizon/commit/89c7d58967520f10b9c7dc32dc9603ddc351ff57) Graphics: a Translucent Batching switch, on by default ### 📊 Changes **5 files changed** (+117 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/graphics.rs` (+16 -10) 📝 `crates/horizon-client-render/src/graphics_style.rs` (+1 -1) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+94 -5) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+3 -0) 📝 `docs/graphics.md` (+3 -3) </details> ### 📄 Description > 🤖 Opened by NerfPhaselock's AI agent (Claude Code, Claude Opus 5.5), not by NerfPhaselock personally. ## What and why Fixes #5983 (4 of 4). Translucent Batching gets a switch and is turned on by default. It needs nothing else first: the arena (#5984), the binding fix (#6181) and the shrinking of its large pages (#6337) are in. - **The switch.** Graphics: Advanced, Performance, after Graphics API: "Translucent Batching", tagged "Saves time" like Shadow Cache, with "Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start." It applies at the next start (or resource reload), as Graphics API does, and is no part of a preset. - **Where the device can't batch** (`translucent_batching_offered`: OpenGL, no indirect multi-draw, or vanilla frames drawn flat), the switch is greyed out and reads Off ("Your GPU or graphics API doesn't support it."), while the saved value waits for a device that can; a click, the wheel or Enter after a click leaves it alone. On macOS, where Metal draws flat and never offers it, it is hidden beside Graphics API. - **On by default, under a new key.** While it was off by default with no switch, every save of `horizon-graphics.txt` wrote `translucentBatching:false`, so under that key the new default would reach no one who has saved an option since #5984. The setting is now `batchTranslucent`; the old key stays ignored, as `shaderPack` is. A `batchTranslucent:false` turns it off. - **Docs.** The Performance row of the settings table and the Translucent batching paragraph: where the switch is, the default, what it gains and costs. **Checked in game** (this commit on the base it was written on, before #6337 merged; rebasing it onto main changed nothing in it; 1920x1080, offscreen, ocean at render distance 16): with no setting it is on (11 draw calls a frame); with only the old `translucentBatching:false` it is still on (5); with `batchTranslucent:false` it is off (79). The switch reads On under Performance, after Graphics API, and its label fits. No validation errors. **Tests.** `graphics_ui.rs` `translucent_batching_is_an_advanced_switch_where_the_device_can`: on Advanced and not Simple, on by default, a click switches it and keeps the preset; where the device can't, it reads Off and neither a click nor Enter after it does anything (no sound, no change, no save). `graphics.rs`: the round trip, the default, `batchTranslucent:false`, and the old key ignored. The three new strings are in `en_us.json` only; the other languages fall back to English for now. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [x] 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 Horizon-only: vanilla draws translucent sections one by one. The picture stays vanilla's. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-4R7C0FC, against upstream/main at ed102e059, 5 min 7 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +117 −19 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (1 min 34 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (56 s) | | tests: horizon-client-lib, horizon-client-render | ✅ 2288 passed (2 min 21 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Screenshots No screenshot attached: the menu shows Mojang's textures. 🤖 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:28:36 +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#6885
No description provided.