[PR #5593] [MERGED] Rain no longer erases the water behind it #6372

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/5593
Author: @rdbtCVS
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/5136-rain-water-depth


📝 Commits (1)

  • ac128db Draw rain after translucent terrain and write no depth (#5136)

📊 Changes

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

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+19 -17)
📝 crates/horizon-client-render/src/gfx/weather.rs (+23 -7)

📄 Description

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

Fixes #5136.

In the classic render path (crates/horizon-client-render/src/gfx.rs), weather was drawn before translucent terrain, and its pipeline wrote depth (gfx/weather.rs). Each rain or snow column wrote its depth first, so the water behind it failed the depth test and the columns cut holes in the water texture.

Vanilla 26.3 (checked against the client jar's bytecode):

  • RenderPipelines.WEATHER = DepthStencilState(GREATER_THAN_OR_EQUAL, false): depth-tested, no depth write.
  • LevelRenderer.executeClassicTransparency order: executeTranslucent → translucent terrain → executeTranslucentAfterTerrain → CloudRenderer.render → WeatherEffectRenderer.render → WorldBorderRenderer.render.

Changes:

  • gfx/weather.rs: depth writes off (the depth state now lives in depth_stencil()), plus a unit test that pins it.
  • gfx.rs: the classic weather draw now comes after translucent terrain, translucent particles and clouds, and the world border follows weather, in vanilla's order. The OIT path (Features, World Border, Weather) and shader packs' gbuffers_weather are unchanged.

Tests

  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean (after rebasing on c9d8e3efa)
  • cargo test -p horizon-client-render --lib gfx::: 150 passed, 0 failed (includes the new gfx::weather::tests::weather_writes_no_depth)
  • python3 tools/pr_ready.py --quick on the earlier base d13980b43: rustfmt, Python tests (498), horizon-client-render tests (727) and doc tests passed. Its clippy failed on audio.rs E0063, a bug already on main at that commit and fixed upstream since (f80c0360d). The workspace clippy above passes on the rebased branch. Parity harnesses left to CI (--quick).

I didn't check it in the running game.

🤖 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/5593 **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/5136-rain-water-depth` --- ### 📝 Commits (1) - [`ac128db`](https://github.com/horizon-rust/horizon/commit/ac128db203dc2b75792f902a589ba54b9b354bbc) Draw rain after translucent terrain and write no depth (#5136) ### 📊 Changes **2 files changed** (+42 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+19 -17) 📝 `crates/horizon-client-render/src/gfx/weather.rs` (+23 -7) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. Fixes #5136. In the classic render path (`crates/horizon-client-render/src/gfx.rs`), weather was drawn **before** translucent terrain, and its pipeline wrote depth (`gfx/weather.rs`). Each rain or snow column wrote its depth first, so the water behind it failed the depth test and the columns cut holes in the water texture. Vanilla 26.3 (checked against the client jar's bytecode): - `RenderPipelines.WEATHER` = `DepthStencilState(GREATER_THAN_OR_EQUAL, false)`: depth-tested, **no depth write**. - `LevelRenderer.executeClassicTransparency` order: `executeTranslucent` → translucent terrain → `executeTranslucentAfterTerrain` → `CloudRenderer.render` → `WeatherEffectRenderer.render` → `WorldBorderRenderer.render`. Changes: - `gfx/weather.rs`: depth writes off (the depth state now lives in `depth_stencil()`), plus a unit test that pins it. - `gfx.rs`: the classic weather draw now comes after translucent terrain, translucent particles and clouds, and the world border follows weather, in vanilla's order. The OIT path (`Features, World Border, Weather`) and shader packs' `gbuffers_weather` are unchanged. ### Tests - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean (after rebasing on c9d8e3efa) - `cargo test -p horizon-client-render --lib gfx::`: 150 passed, 0 failed (includes the new `gfx::weather::tests::weather_writes_no_depth`) - `python3 tools/pr_ready.py --quick` on the earlier base d13980b43: rustfmt, Python tests (498), `horizon-client-render` tests (727) and doc tests passed. Its clippy failed on `audio.rs` E0063, a bug already on main at that commit and fixed upstream since (f80c0360d). The workspace clippy above passes on the rebased branch. Parity harnesses left to CI (`--quick`). I didn't check it in the running game. 🤖 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#6372
No description provided.