[PR #198] [MERGED] The dragon fight's world fog and the End's void darkness floor #2396

Closed
opened 2026-11-02 15:55:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/end-fog-103


📝 Commits (1)

  • 3319e6e The dragon fight's world fog, and void darkness from each dimension's floor

📊 Changes

3 files changed (+66 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/fog.rs (+57 -0)
📝 crates/horizon-client/src/game/dragon.rs (+6 -1)
📝 crates/horizon-client/src/game/render_tick.rs (+3 -1)

📄 Description

Fixes #103

Compared with vanilla 26.3's FogRenderer, AtmosphericFogEnvironment, the End's environment attributes and SkyRenderer:

  • Already matching (no change): the End's visual/fog_color #181318 and sky_color #000000 from dimension_type/the_end.json mixed by getBaseColor's sky-fog factor (ARGB.srgbLerp is a plain lerp in 26.3), SkyRenderer.buildEndSky (six faces of end_sky.png tiled 16×, colour 0xFF282828) and the End flash (end_flash at height 100, scale 60, plus its sky-light boost).
  • Missing: the dragon fight's world fog. EnderDragonFight creates its boss event with setCreateWorldFog(true); while such a bar shows, AtmosphericFogEnvironment.setupFog clamps environmentalStart to 10, environmentalEnd to 96 and sets sky and cloud fog ends to it. Horizon never did, so the End stayed clear during the fight. FogInputs::boss_world_fog now carries BossHealthOverlay.shouldCreateWorldFog (the dragon's bar is shown; same condition as the bar itself, dragon_bar_shown).
  • Missing: the End's floor for void darkness. computeFogColor darkens the fog from voidDarknessOnsetRange + level.getMinY() - camera.y; the End and the Nether start at y 0, but Horizon passed the Overworld's -64 for every dimension, so the End's fog never darkened below y 32.

Proof

  • Unit tests in fog.rs: boss_world_fog_closes_in (0/96 start/end, sky and cloud ends 96, water unaffected) and void_darkness_starts_32_above_the_floor (min_y 0: y 16 → brightness 0.25, y 32 → unchanged). cargo test -p horizon-client --lib fog, cargo fmt --check, workspace clippy -D warnings on the Mac mini: clean. No harness covers FogRenderer.setupFog itself (the environment harness covers the attributes, unchanged here).
  • In game (vscreen, same End world, same spot, dragon alive): agent-state/wave5b-shots/103-end-dragon-fog-before-after.png on the desktop, main on the left (the far spikes and the island edge sharp), this branch on the right (the fight's fog closes in by 96 blocks); 103-end-below-y32-before-after.png from y 20 under the island.

Not changed here (not End-specific, noted for later): darkenWorldAmount (the wither's setDarkenScreen boss bar darkening fog and lightmap), superflat worlds' 1-block void onset (flat is always false in frame_fog), and blindness fog (blindness: None in frame_fog).

🤖 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/198 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/end-fog-103` --- ### 📝 Commits (1) - [`3319e6e`](https://github.com/horizon-rust/horizon/commit/3319e6e204b985dceaed2d1b1d8094c861f6ea16) The dragon fight's world fog, and void darkness from each dimension's floor ### 📊 Changes **3 files changed** (+66 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/fog.rs` (+57 -0) 📝 `crates/horizon-client/src/game/dragon.rs` (+6 -1) 📝 `crates/horizon-client/src/game/render_tick.rs` (+3 -1) </details> ### 📄 Description Fixes #103 Compared with vanilla 26.3's `FogRenderer`, `AtmosphericFogEnvironment`, the End's environment attributes and `SkyRenderer`: - **Already matching** (no change): the End's `visual/fog_color` `#181318` and `sky_color` `#000000` from `dimension_type/the_end.json` mixed by `getBaseColor`'s sky-fog factor (`ARGB.srgbLerp` is a plain lerp in 26.3), `SkyRenderer.buildEndSky` (six faces of `end_sky.png` tiled 16×, colour `0xFF282828`) and the End flash (`end_flash` at height 100, scale 60, plus its sky-light boost). - **Missing: the dragon fight's world fog.** `EnderDragonFight` creates its boss event with `setCreateWorldFog(true)`; while such a bar shows, `AtmosphericFogEnvironment.setupFog` clamps `environmentalStart` to 10, `environmentalEnd` to 96 and sets sky and cloud fog ends to it. Horizon never did, so the End stayed clear during the fight. `FogInputs::boss_world_fog` now carries `BossHealthOverlay.shouldCreateWorldFog` (the dragon's bar is shown; same condition as the bar itself, `dragon_bar_shown`). - **Missing: the End's floor for void darkness.** `computeFogColor` darkens the fog from `voidDarknessOnsetRange + level.getMinY() - camera.y`; the End and the Nether start at y 0, but Horizon passed the Overworld's -64 for every dimension, so the End's fog never darkened below y 32. **Proof** - Unit tests in `fog.rs`: `boss_world_fog_closes_in` (0/96 start/end, sky and cloud ends 96, water unaffected) and `void_darkness_starts_32_above_the_floor` (min_y 0: y 16 → brightness 0.25, y 32 → unchanged). `cargo test -p horizon-client --lib fog`, `cargo fmt --check`, workspace clippy `-D warnings` on the Mac mini: clean. No harness covers `FogRenderer.setupFog` itself (the environment harness covers the attributes, unchanged here). - In game (vscreen, same End world, same spot, dragon alive): `agent-state/wave5b-shots/103-end-dragon-fog-before-after.png` on the desktop, main on the left (the far spikes and the island edge sharp), this branch on the right (the fight's fog closes in by 96 blocks); `103-end-below-y32-before-after.png` from y 20 under the island. Not changed here (not End-specific, noted for later): `darkenWorldAmount` (the wither's `setDarkenScreen` boss bar darkening fog and lightmap), superflat worlds' 1-block void onset (`flat` is always false in `frame_fog`), and blindness fog (`blindness: None` in `frame_fog`). 🤖 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-02 15:55:41 +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#2396
No description provided.