[PR #2378] [MERGED] Dim the sun and moon in rain and turn the moon texture the right way up #4258

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2378
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/sky-body-rain-brightness


📝 Commits (1)

  • b65b0a6 Dim the sun and moon in rain and turn the moon texture the right way up

📊 Changes

1 file changed (+17 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+17 -12)

📄 Description

What and why

The sun and moon stayed fully bright while it rained, and the moon's phase texture was drawn turned 180 degrees.

Both bodies were drawn with a white, fully opaque colour and the sun's texture coordinates. Now their colour alpha is 1 - rain level, so they fade as the rain grows, and the moon uses its own texture coordinate order.

Vanilla reference

  • SkyRenderer.extractRenderState: rainBrightness = 1.0F - level.getRainLevel(partialTicks).
  • SkyRenderer.renderSun / renderMoon: the colour is (1, 1, 1, rainBrightness).
  • SkyRenderer.buildCelestialQuad (sun) and buildMoonPhases (moon): the moon's UVs are (u1,v1), (u0,v1), (u0,v0), (u1,v0).

Self-check

cargo check -p horizon-client passes.


🔄 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/2378 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sky-body-rain-brightness` --- ### 📝 Commits (1) - [`b65b0a6`](https://github.com/horizon-rust/horizon/commit/b65b0a6a7d7b481b35c1a844e641908c3ea68a95) Dim the sun and moon in rain and turn the moon texture the right way up ### 📊 Changes **1 file changed** (+17 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+17 -12) </details> ### 📄 Description ## What and why The sun and moon stayed fully bright while it rained, and the moon's phase texture was drawn turned 180 degrees. Both bodies were drawn with a white, fully opaque colour and the sun's texture coordinates. Now their colour alpha is `1 - rain level`, so they fade as the rain grows, and the moon uses its own texture coordinate order. ## Vanilla reference - `SkyRenderer.extractRenderState`: `rainBrightness = 1.0F - level.getRainLevel(partialTicks)`. - `SkyRenderer.renderSun` / `renderMoon`: the colour is `(1, 1, 1, rainBrightness)`. - `SkyRenderer.buildCelestialQuad` (sun) and `buildMoonPhases` (moon): the moon's UVs are `(u1,v1), (u0,v1), (u0,v0), (u1,v0)`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:51 +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#4258
No description provided.