[PR #1842] [CLOSED] Renderer: one post-processing chain hook over the world, for every pack kind #3805

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1842
Author: @ludovic111
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: feat/world-post-chain-hook


📝 Commits (2)

  • 99a8ea0 Renderer: one post-processing chain hook over the world, for every pack kind
  • ec4e5e7 Merge origin/main into feat/world-post-chain-hook

📊 Changes

2 files changed (+59 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/gfx.rs (+19 -17)
📝 crates/horizon-client/src/gfx/world_post.rs (+40 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

One shared hook for post-processing over the world. The world's own target (world_post::prepare(always)) and the dispatch that draws it onto the screen, under the hand and HUD, now go through world_post::Chain, an enum with one variant per kind of post-processing:

pub enum Chain {
    /// A shader pack in the `shaders/` format (`pack_post.rs`).
    Java(super::pack_post::PackPost),
}

Renderer.pack_post: Option<(i32, Option<PackPost>)> becomes post_chain: Option<Chain> plus shader_pack_dimension: Option<i32> (what the dimension pair tracked). set_shader_pack and shader_pack_dimension() keep their signatures and behaviour; pack_post.rs is untouched.

Why

Horizon's own WGSL shader packs (docs/api/shaders.md, #1817 → #1822) need the same post hook as the shaders/-format loader. Agreed through the orchestrator: share the hook instead of duplicating it. The native packs add Chain::Native in the next PR; one chain runs at a time.

How tested

cargo clippy -p horizon-client --all-targets -- -D warnings: clean; cargo fmt --check: clean
cargo build --profile fast -p horizon-client --bins: ok
Game on the Mac mini (Metal), isolated HORIZON_HOME/XDG dirs, --offscreen, seed 12345, time 1000:
  no pack: vanilla picture, unchanged
  HORIZON_SHADER_PACK=post-test (crates/horizon-shaders/tests/packs/post-test): the warm tint, the depth fog bands on the
  right half and the vignette all draw through Chain::Java, as before

The 110 harnesses parity.py --changed lists for gfx.rs were not run: this only renames the field and routes the same call through a match, with no pack set the code path is the same world_post.prepare(.., false) and finish. CI's parity job runs them.

Needs Ludovic

Nothing. skip-release. cleanroom-impl-1 is asked (through the orchestrator) to review the shape.

🤖 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/1842 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/world-post-chain-hook` --- ### 📝 Commits (2) - [`99a8ea0`](https://github.com/horizon-rust/horizon/commit/99a8ea053bd5cb590dec1acf9b3f0b53b1b190c2) Renderer: one post-processing chain hook over the world, for every pack kind - [`ec4e5e7`](https://github.com/horizon-rust/horizon/commit/ec4e5e7f7db99583f34f454cd9fa6229ac411776) Merge origin/main into feat/world-post-chain-hook ### 📊 Changes **2 files changed** (+59 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/gfx.rs` (+19 -17) 📝 `crates/horizon-client/src/gfx/world_post.rs` (+40 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What One shared hook for post-processing over the world. The world's own target (`world_post::prepare(always)`) and the dispatch that draws it onto the screen, under the hand and HUD, now go through `world_post::Chain`, an enum with one variant per kind of post-processing: ```rust pub enum Chain { /// A shader pack in the `shaders/` format (`pack_post.rs`). Java(super::pack_post::PackPost), } ``` `Renderer.pack_post: Option<(i32, Option<PackPost>)>` becomes `post_chain: Option<Chain>` plus `shader_pack_dimension: Option<i32>` (what the dimension pair tracked). `set_shader_pack` and `shader_pack_dimension()` keep their signatures and behaviour; `pack_post.rs` is untouched. ## Why Horizon's own WGSL shader packs (docs/api/shaders.md, #1817 → #1822) need the same post hook as the `shaders/`-format loader. Agreed through the orchestrator: share the hook instead of duplicating it. The native packs add `Chain::Native` in the next PR; one chain runs at a time. ## How tested ``` cargo clippy -p horizon-client --all-targets -- -D warnings: clean; cargo fmt --check: clean cargo build --profile fast -p horizon-client --bins: ok Game on the Mac mini (Metal), isolated HORIZON_HOME/XDG dirs, --offscreen, seed 12345, time 1000: no pack: vanilla picture, unchanged HORIZON_SHADER_PACK=post-test (crates/horizon-shaders/tests/packs/post-test): the warm tint, the depth fog bands on the right half and the vignette all draw through Chain::Java, as before ``` The 110 harnesses `parity.py --changed` lists for gfx.rs were not run: this only renames the field and routes the same call through a match, with no pack set the code path is the same `world_post.prepare(.., false)` and `finish`. CI's parity job runs them. ## Needs Ludovic Nothing. `skip-release`. cleanroom-impl-1 is asked (through the orchestrator) to review the shape. 🤖 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 04:12:26 +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#3805
No description provided.