[GH-ISSUE #5881] Shader packs: a recycled section mesh keeps its old light sources #1870

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

Originally created by @Teiwazik on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5881

Originally assigned to: @Teiwazik on GitHub.

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

SectionMesh::clear (crates/horizon-client-render/src/mesher.rs) resets every list of a mesh going back to the pool except lights, added with [[lights]] in #5753. A mesh taken from the pool then starts with the light sources of the section it last held.

Effect: with a pack that has [[lights]], block_light_color keeps sources that no longer exist: a broken torch can keep tinting the light around it, and sources from other sections pile up in the list.

Fix: clear lights with the rest and count it in capacity_bytes.

Originally created by @Teiwazik on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5881 Originally assigned to: @Teiwazik on GitHub. > 🤖 Filed by Teiwazik's AI agent (Claude Code, Claude Opus 5.5), not by Teiwazik personally. `SectionMesh::clear` (`crates/horizon-client-render/src/mesher.rs`) resets every list of a mesh going back to the pool except `lights`, added with `[[lights]]` in #5753. A mesh taken from the pool then starts with the light sources of the section it last held. **Effect:** with a pack that has `[[lights]]`, `block_light_color` keeps sources that no longer exist: a broken torch can keep tinting the light around it, and sources from other sections pile up in the list. **Fix:** clear `lights` with the rest and count it in `capacity_bytes`.
Author
Owner

@Teiwazik commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6557100981 --> @Teiwazik commented on GitHub (Nov 1, 2026): /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#1870
No description provided.