[PR #6000] [MERGED] feat(mods): computed world fog color hook #6604

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

📋 Pull Request Information

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

Base: main ← Head: native/compute-fog-color


📝 Commits (1)

  • e0d42f6 feat(mods): adjust computed world fog color

📊 Changes

4 files changed (+93 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/native_hooks.rs (+11 -0)
📝 crates/horizon-client/src/game/render_tick.rs (+19 -0)
➕ tests/test_compute_fog_color_hook.py (+51 -0)
➕ tools/native-hook-fragments/compute_fog_color.json (+12 -0)

📄 Description

🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally.

What and why

Fixes #5996; part of #4953. native_compute_fog_color(partial, camera, fog_type, rgb) adjusts computed world fog RGB after normal biome/weather/effect calculations and before upload. Atmospheric, water, lava and powder-snow contexts are forwarded. Finite components in 0..=1 are accepted; invalid requests retain the original color. Alpha and distances are preserved. Title panoramas skip the hook.

Kind

  • feature: something new for players

Vanilla reference

Read the player's pinned 26.3 FogRenderer.computeFogColor/setupFog/updateBuffer bytecode. Public contract: ViewportEvent.ComputeFogColor. No game files included.

Other projects' code

None; public event documentation only.

Self-check

Client Clippy --all-targets -D warnings passed. The actual dispatch helper compiled and executed with a fake mod for no override, RGB boundaries, NaN, infinity, negative/out-of-range values and alpha preservation across all four fog environments. Four fragment-tool tests, formatting, diff/public-tree checks passed. Independent read-only review found no issues. API fragment only. No game launch/screenshots or full game test suite; CI pending.

🤖 Generated with Codex


🔄 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/6000 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `native/compute-fog-color` --- ### 📝 Commits (1) - [`e0d42f6`](https://github.com/horizon-rust/horizon/commit/e0d42f671903d305bd286c6fe92f8a9275b61775) feat(mods): adjust computed world fog color ### 📊 Changes **4 files changed** (+93 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/native_hooks.rs` (+11 -0) 📝 `crates/horizon-client/src/game/render_tick.rs` (+19 -0) ➕ `tests/test_compute_fog_color_hook.py` (+51 -0) ➕ `tools/native-hook-fragments/compute_fog_color.json` (+12 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally. ## What and why Fixes #5996; part of #4953. `native_compute_fog_color(partial, camera, fog_type, rgb)` adjusts computed world fog RGB after normal biome/weather/effect calculations and before upload. Atmospheric, water, lava and powder-snow contexts are forwarded. Finite components in 0..=1 are accepted; invalid requests retain the original color. Alpha and distances are preserved. Title panoramas skip the hook. ## Kind - [x] feature: something new for players ## Vanilla reference Read the player's pinned 26.3 FogRenderer.computeFogColor/setupFog/updateBuffer bytecode. Public contract: [ViewportEvent.ComputeFogColor](https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/ViewportEvent.ComputeFogColor.html). No game files included. ## Other projects' code None; public event documentation only. ## Self-check Client Clippy --all-targets -D warnings passed. The actual dispatch helper compiled and executed with a fake mod for no override, RGB boundaries, NaN, infinity, negative/out-of-range values and alpha preservation across all four fog environments. Four fragment-tool tests, formatting, diff/public-tree checks passed. Independent read-only review found no issues. API fragment only. No game launch/screenshots or full game test suite; CI pending. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:23: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#6604
No description provided.