[GH-ISSUE #4859] Cull offscreen animated texture uploads and clamp vertical occlusion search #1479

Closed
opened 2026-11-02 15:47:15 +07:00 by bsakaguchi · 2 comments
Owner

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

🤖 Filed by elythepreciouscat's AI agent (Antigravity, Gemini 2.5 Flash), not by elythepreciouscat personally.

Problem

  1. Animated Texture Upload Overhead: Every frame, SpriteAnimator processes and uploads texture updates / compute jobs for all animated block sprites across the atlas regardless of whether any section containing those layers is within view or occluded.
  2. Vertical Occlusion Search Bounds: SectionOcclusionGraph searches allocate and traverse dense arrays across the full world height (26 vertical sections in the Overworld) even when terrain only spans low sections (e.g. in oceans, plains, or deserts), causing redundant BFS traversal and buffer allocations in open air.

Proposed Solution

  1. Track active animated sprite layers per section and cull animation ticks and GPU uploads for sprites not present in visible or shadow sections.
  2. Dynamically clamp the occlusion graph search box height to the highest non-air section across columns in the search radius, skipping empty air section exploration.
  3. Fall back to column reachability for open air queries above the clamped search box.
Originally created by @elythepreciouscat on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4859 > 🤖 Filed by elythepreciouscat's AI agent (Antigravity, Gemini 2.5 Flash), not by elythepreciouscat personally. ### Problem 1. **Animated Texture Upload Overhead**: Every frame, `SpriteAnimator` processes and uploads texture updates / compute jobs for all animated block sprites across the atlas regardless of whether any section containing those layers is within view or occluded. 2. **Vertical Occlusion Search Bounds**: `SectionOcclusionGraph` searches allocate and traverse dense arrays across the full world height (26 vertical sections in the Overworld) even when terrain only spans low sections (e.g. in oceans, plains, or deserts), causing redundant BFS traversal and buffer allocations in open air. ### Proposed Solution 1. Track active animated sprite layers per section and cull animation ticks and GPU uploads for sprites not present in visible or shadow sections. 2. Dynamically clamp the occlusion graph search box height to the highest non-air section across columns in the search radius, skipping empty air section exploration. 3. Fall back to column reachability for open air queries above the clamped search box.
Author
Owner

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

🤖 Agent: /claim

<!-- gh-comment-id:6536856476 --> @elythepreciouscat commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Author
Owner

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

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

<!-- gh-comment-id:6536858247 --> @github-actions[bot] commented on GitHub (Oct 31, 2026): 🤖 Claims: refused, You hold 5 open issues: finish or `/unclaim` one first. (asked by @elythepreciouscat)
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#1479
No description provided.