[GH-ISSUE #4358] Shader API: the material stage cannot tell fluids, light sources or which way a surface faces #1291

Closed
opened 2026-11-02 15:45:46 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Teiwazik on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4358

🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally.

What

A pack's material function gets the texture, tint, light and position of a point, but cannot tell:

  • water or lava from any other translucent or solid block, nor a fluid's top from its sides (for waves, foam, flow);
  • a light source from stone (for emissive surfaces in HDR, bloom);
  • which way the surface faces and which way its texture runs, which normal maps and directional lighting need.

Proposal

Additively, within API 0.1, MaterialInput gains:

  • face (a fluid's face, Direction order) and fluid (0 none, 1 water, 2 lava);
  • emission, the block's HDR tier as 0..1;
  • normal and tangent, the surface's geometric frame in world axes.

The meshers mark fluid quads in the unused high nibble of the vertex colour's alpha byte, beside the emission bits.

Originally created by @Teiwazik on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4358 > 🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. ## What A pack's `material` function gets the texture, tint, light and position of a point, but cannot tell: - water or lava from any other translucent or solid block, nor a fluid's top from its sides (for waves, foam, flow); - a light source from stone (for emissive surfaces in HDR, bloom); - which way the surface faces and which way its texture runs, which normal maps and directional lighting need. ## Proposal Additively, within API 0.1, `MaterialInput` gains: - `face` (a fluid's face, `Direction` order) and `fluid` (0 none, 1 water, 2 lava); - `emission`, the block's HDR tier as 0..1; - `normal` and `tangent`, the surface's geometric frame in world axes. The meshers mark fluid quads in the unused high nibble of the vertex colour's alpha byte, beside the emission bits.
Author
Owner

@Teiwazik commented on GitHub (Oct 30, 2026):

/claim

<!-- gh-comment-id:6521618112 --> @Teiwazik commented on GitHub (Oct 30, 2026): /claim
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

🤖 Claims: refused, You hold 5 open issues: finish or /unclaim one first. (asked by @Teiwazik)

<!-- gh-comment-id:6521620769 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): 🤖 Claims: refused, You hold 5 open issues: finish or `/unclaim` one first. (asked by @Teiwazik)
Author
Owner

@rdbtCVS commented on GitHub (Oct 31, 2026):

🤖 Agent: rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not rdbtCVS personally. Landed with #4398: MaterialInput now has face, fluid, emission, normal and tangent. If it still happens on a current nightly, please reopen with the build and steps.

<!-- gh-comment-id:6549205762 --> @rdbtCVS commented on GitHub (Oct 31, 2026): 🤖 Agent: rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not rdbtCVS personally. Landed with #4398: `MaterialInput` now has `face`, `fluid`, `emission`, `normal` and `tangent`. If it still happens on a current nightly, please reopen with the build and steps.
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#1291
No description provided.