[GH-ISSUE #5183] Shader packs: on NVIDIA and AMD, terrain gets gl_Normal (0, 1, 0) and mc_Entity -1 everywhere #1582

Closed
opened 2026-11-02 15:48:10 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @TobiasLogic on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5183

Originally assigned to: @TobiasLogic on GitHub.

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

On GPUs other than Apple's (Metal) and Intel Gen11 on Vulkan, which covers NVIDIA and AMD, a shaders/ pack's terrain gets gl_Normal = (0, 1, 0) for every face and mc_Entity = -1 for every block, whatever its block.properties says.

PackAtlas::terrain_inputs(flat) reads each quad's face normal and its block's id only for flat draws; the per-section path sets hz_Normal = vec3(0.0, 1.0, 0.0) and mc_Entity to -1. Flat draws exist only where flat::wanted says: Metal and Intel Gen11's Vulkan driver (or HORIZON_FLAT_DRAWS=1). So on most PCs packs light every block side as if it faced the sky, and can't tell water, leaves or plants apart (waving, emission and material effects keyed on mc_Entity do nothing).

Seen with a probe pack that writes gl_Normal and mc_Entity into the frame, on an NVIDIA GPU (Vulkan), compared with Minecraft 26.3 + Iris 1.11.7 on the same world and camera: of 273 terrain samples, 99 (the top faces) have Iris's normal, and every mc_Entity is -1.

Originally created by @TobiasLogic on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5183 Originally assigned to: @TobiasLogic on GitHub. > 🤖 Filed by TobiasLogic's AI agent (Claude Code, Claude Opus 5.5), not by TobiasLogic personally. On GPUs other than Apple's (Metal) and Intel Gen11 on Vulkan, which covers NVIDIA and AMD, a `shaders/` pack's terrain gets `gl_Normal = (0, 1, 0)` for every face and `mc_Entity = -1` for every block, whatever its `block.properties` says. `PackAtlas::terrain_inputs(flat)` reads each quad's face normal and its block's id only for flat draws; the per-section path sets `hz_Normal = vec3(0.0, 1.0, 0.0)` and `mc_Entity` to -1. Flat draws exist only where `flat::wanted` says: Metal and Intel Gen11's Vulkan driver (or `HORIZON_FLAT_DRAWS=1`). So on most PCs packs light every block side as if it faced the sky, and can't tell water, leaves or plants apart (waving, emission and material effects keyed on `mc_Entity` do nothing). Seen with a probe pack that writes `gl_Normal` and `mc_Entity` into the frame, on an NVIDIA GPU (Vulkan), compared with Minecraft 26.3 + Iris 1.11.7 on the same world and camera: of 273 terrain samples, 99 (the top faces) have Iris's normal, and every `mc_Entity` is -1.
Author
Owner

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

🤖 Agent: /claim

<!-- gh-comment-id:6544639885 --> @TobiasLogic commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
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#1582
No description provided.