[PR #7360] [CLOSED] Port map: the two PostChain rows are the post-effect loader and pass builder #7549

Closed
opened 2026-11-03 07:19:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7360
Author: @MSedgeMC
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: chore/stale2-client2-001


📝 Commits (1)

  • 1240d8e port map: PostChain.load and createPass are the post-effect loader and pass builder

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 tools/port_map/client2-001.tsv (+2 -2)

📄 Description

Rows of tools/port_map/client2-001.tsv (150 rows, map-check clean against 26.3): the two post-chain rows the ledger counts as ported in post_chain.rs.

Rows

row was now where
PostChain.load missing port crates/horizon-client-render/src/post_chain.rs::PostEffects::load
PostChain.createPass missing port crates/horizon-client-render/src/post_chain.rs::PostEffects::translated_pass
  • PostEffects::load (post_chain.rs:681) is PostChain.load, as its doc says: it reads post_effect/<id>.json from the active resource root (resource_path), parses it (Config::parse), rejects an external target other than minecraft:main with vanilla's "Referenced external targets are not available in this context" wording, and builds the target list with main first. A missing file is Ok(None) — no chain, like ShaderManager's cache miss — and a chain that fails to load is recorded once and skipped, like GameRenderer.failedPostEffects.
  • PostEffects::translated_pass (post_chain.rs:739) is PostChain.createPass: it translates the pass's vertex and fragment GLSL from the same root, builds its inputs (a target's colour or depth, or a textures/effect/ image, with the bilinear flag), its uniform blocks (SamplerInfo, Globals, custom blocks packed std140) and its output target. Its doc names PostChain.createPass; a shader that will not translate falls back to standin_pass (post_chain.rs:861), Horizon's WGSL stand-ins for the vanilla core shaders.

Both are reached: PostEffects::apply calls load for each requested effect, and load calls translated_pass for each pass; gfx calls apply after the level and before the GUI (the addToFrame/process rows already point at the outline and blur chains).

The old notes ("no data-driven post chain loader"; "no data-driven post pass creation") describe the tree before post_chain.rs; it now loads and compiles the chains from the resource root.

Map-check:

PORT_LEDGER_OUT=/tmp/led-stale2 python3 tools/port_ledger.py map-check tools/port_map/client2-001.tsv
150 rows, no problems.

Proven: both rows read at this commit, with the doc citations that made the ledger count them as ported; the JSON read and external-target check in load, the shader/input/uniform/output construction in translated_pass, and the apply → load → translated_pass wiring in post_chain.rs and gfx.rs.

Not proven: no player-visible change — this records code that exists. I did not run a resource pack with its own post-effect chain in a client, and the getReferencedExternalTargets, TargetBundle and frame-graph rows are untouched.


🔄 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/7360 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chore/stale2-client2-001` --- ### 📝 Commits (1) - [`1240d8e`](https://github.com/horizon-rust/horizon/commit/1240d8ea6df3aee6306ce8b67368587321415c13) port map: PostChain.load and createPass are the post-effect loader and pass builder ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/client2-001.tsv` (+2 -2) </details> ### 📄 Description Rows of `tools/port_map/client2-001.tsv` (150 rows, map-check clean against 26.3): the two post-chain rows the ledger counts as ported in `post_chain.rs`. **Rows** | row | was | now | where | | --- | --- | --- | --- | | `PostChain.load` | missing | port | `crates/horizon-client-render/src/post_chain.rs::PostEffects::load` | | `PostChain.createPass` | missing | port | `crates/horizon-client-render/src/post_chain.rs::PostEffects::translated_pass` | - `PostEffects::load` (`post_chain.rs:681`) is `PostChain.load`, as its doc says: it reads `post_effect/<id>.json` from the active resource root (`resource_path`), parses it (`Config::parse`), rejects an external target other than `minecraft:main` with vanilla's "Referenced external targets are not available in this context" wording, and builds the target list with `main` first. A missing file is `Ok(None)` — no chain, like `ShaderManager`'s cache miss — and a chain that fails to load is recorded once and skipped, like `GameRenderer.failedPostEffects`. - `PostEffects::translated_pass` (`post_chain.rs:739`) is `PostChain.createPass`: it translates the pass's vertex and fragment GLSL from the same root, builds its inputs (a target's colour or depth, or a `textures/effect/` image, with the bilinear flag), its uniform blocks (`SamplerInfo`, `Globals`, custom blocks packed std140) and its output target. Its doc names `PostChain.createPass`; a shader that will not translate falls back to `standin_pass` (`post_chain.rs:861`), Horizon's WGSL stand-ins for the vanilla core shaders. Both are reached: `PostEffects::apply` calls `load` for each requested effect, and `load` calls `translated_pass` for each pass; `gfx` calls `apply` after the level and before the GUI (the `addToFrame`/`process` rows already point at the outline and blur chains). The old notes ("no data-driven post chain loader"; "no data-driven post pass creation") describe the tree before `post_chain.rs`; it now loads and compiles the chains from the resource root. Map-check: ``` PORT_LEDGER_OUT=/tmp/led-stale2 python3 tools/port_ledger.py map-check tools/port_map/client2-001.tsv 150 rows, no problems. ``` **Proven:** both rows read at this commit, with the doc citations that made the ledger count them as ported; the JSON read and external-target check in `load`, the shader/input/uniform/output construction in `translated_pass`, and the `apply` → `load` → `translated_pass` wiring in `post_chain.rs` and `gfx.rs`. **Not proven:** no player-visible change — this records code that exists. I did not run a resource pack with its own post-effect chain in a client, and the `getReferencedExternalTargets`, `TargetBundle` and frame-graph rows are untouched. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:33 +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#7549
No description provided.