[PR #7909] Fix core matrix inputs for shader geometry programs #7891

Open
opened 2026-11-03 07:26:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7909
Author: @gigamans442
Created: 11/3/2026
Status: 🔄 Open

Base: main ← Head: fix/core-line-matrix-inputs-20261102


📝 Commits (1)

  • ab10ec0 Fix core matrix inputs for shader geometry programs

📊 Changes

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

View changed files

📝 crates/horizon-client-render/src/gfx/pack_uniforms.rs (+212 -0)
📝 crates/horizon-shaders/src/translate/mod.rs (+112 -0)
📝 crates/horizon-shaders/src/translate/rewrite.rs (+5 -0)
📝 crates/horizon-shaders/src/translate/scan.rs (+50 -0)

📄 Description

🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1 Sol), not by gigamans442 personally.

What and why

Fixes #7890. Geometry programs can use projectionMatrix and modelViewMatrix without declarations, and explicitly declared mat4 uniforms use the existing frame or shadow transform state instead of unpopulated uniform slots. Authored globals, functions, members and local shadows keep their meaning; unrelated unknown names remain errors. Composite programs keep their existing behavior.

This fixes the core matrix input portion of the line compatibility gap. #7698 continues to own outline routing, widening and vertex order; complete Complementary outline behavior is not claimed here. This PR has no code dependency on #7698.

Draft: original baseline failure is confirmed; the exact-head shader library suite passes 160/160. The actual provider GPU test is building under the shared local lease. Official exact-head checks attempt 2 is running; the first attempt required action before jobs started. The PR will stay draft until actual results are reviewed.

Kind

  • bug: a crash or a breakage

Vanilla reference

Shader-pack compatibility input state, using Horizon's existing geometry and shadow matrices. The public matrix format reference documents the core matrix names. Original regression shaders exercise the input contract; no vanilla gameplay change.

Other projects' code

Cross-referenced shader-pack features against Horizon’s support to identify compatibility gaps. The implementation is original Horizon code.

Self-check

  • Original new control on unchanged main 31f83499: fails with Unknown variable: projectionMatrix (1 failed / 158 filtered).
  • Final head ab10ec05eaceaccb36e8c6658a65876f2f7c14bf: rustfmt, diff whitespace and public-tree checks pass. Four files, 379 additions; existing declaration/initializer parser unchanged.
  • Read-only source composition with #7698 (db561750) and #7842 (abd747cc) is clean. This is not a combined build or pixel result.
  • Exact-head shader library suite: 160 passed, zero failed, including both new core-matrix contract tests.
  • Opt-in real GPU test: building, no pixel result yet. It checks actual frame-provider bytes under nonidentity transforms and a distant camera, with independent expected pixels for core/declared/legacy inputs and authored local/global matrices. It does not test outline geometry or shadow pixels.
  • Local tools/pr_ready.py --base origin/main: deferred before lease acquisition to prioritize focused checks; no self-check block or local broad-check pass is claimed. Exact-head official checks run 41550554695, attempt 2 is running. Launcher checking passed; verify is pending. Parity-related jobs are skipped, not passed. The first attempt required action before jobs started.

🤖 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/7909 **Author:** [@gigamans442](https://github.com/gigamans442) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/core-line-matrix-inputs-20261102` --- ### 📝 Commits (1) - [`ab10ec0`](https://github.com/horizon-rust/horizon/commit/ab10ec05eaceaccb36e8c6658a65876f2f7c14bf) Fix core matrix inputs for shader geometry programs ### 📊 Changes **4 files changed** (+379 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx/pack_uniforms.rs` (+212 -0) 📝 `crates/horizon-shaders/src/translate/mod.rs` (+112 -0) 📝 `crates/horizon-shaders/src/translate/rewrite.rs` (+5 -0) 📝 `crates/horizon-shaders/src/translate/scan.rs` (+50 -0) </details> ### 📄 Description > 🤖 Opened by gigamans442's AI agent (Codex, GPT-6.1 Sol), not by gigamans442 personally. ## What and why Fixes #7890. Geometry programs can use `projectionMatrix` and `modelViewMatrix` without declarations, and explicitly declared `mat4` uniforms use the existing frame or shadow transform state instead of unpopulated uniform slots. Authored globals, functions, members and local shadows keep their meaning; unrelated unknown names remain errors. Composite programs keep their existing behavior. This fixes the core matrix input portion of the line compatibility gap. #7698 continues to own outline routing, widening and vertex order; complete Complementary outline behavior is not claimed here. This PR has no code dependency on #7698. **Draft:** original baseline failure is confirmed; the exact-head shader library suite passes 160/160. The actual provider GPU test is building under the shared local lease. Official exact-head checks attempt 2 is running; the first attempt required action before jobs started. The PR will stay draft until actual results are reviewed. ## Kind - [x] bug: a crash or a breakage ## Vanilla reference Shader-pack compatibility input state, using Horizon's existing geometry and shadow matrices. The public matrix format reference documents the [core matrix names](https://github.com/IrisShaders/DocsPage/blob/98f84cbe456e7e367afe788885869be46681be8c/src/content/docs/current/Reference/Uniforms/matrices.mdx). Original regression shaders exercise the input contract; no vanilla gameplay change. ## Other projects' code Cross-referenced shader-pack features against Horizon’s support to identify compatibility gaps. The implementation is original Horizon code. ## Self-check - Original new control on unchanged main `31f83499`: fails with `Unknown variable: projectionMatrix` (1 failed / 158 filtered). - Final head `ab10ec05eaceaccb36e8c6658a65876f2f7c14bf`: rustfmt, diff whitespace and public-tree checks pass. Four files, 379 additions; existing declaration/initializer parser unchanged. - Read-only source composition with #7698 (`db561750`) and #7842 (`abd747cc`) is clean. This is not a combined build or pixel result. - Exact-head shader library suite: 160 passed, zero failed, including both new core-matrix contract tests. - Opt-in real GPU test: building, no pixel result yet. It checks actual frame-provider bytes under nonidentity transforms and a distant camera, with independent expected pixels for core/declared/legacy inputs and authored local/global matrices. It does not test outline geometry or shadow pixels. - Local `tools/pr_ready.py --base origin/main`: deferred before lease acquisition to prioritize focused checks; no self-check block or local broad-check pass is claimed. Exact-head official [checks run 41550554695, attempt 2](https://github.com/horizon-rust/horizon/actions/runs/41550554695/attempts/2) is running. Launcher checking passed; verify is pending. Parity-related jobs are skipped, not passed. The first attempt required action before jobs started. 🤖 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>
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#7891
No description provided.