[PR #4635] [MERGED] Parity: view-blocking overlay from isViewBlocking and the near plane #5743

Closed
opened 2026-11-03 05:14:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4635
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/23-misc


📝 Commits (1)

  • 08918a8 Show the view-blocking block overlay by BlockState.isViewBlocking against the near plane

📊 Changes

4 files changed (+135 additions, -26 deletions)

View changed files

📝 crates/horizon-client-render/src/camera.rs (+41 -0)
📝 crates/horizon-client/src/game/cushions.rs (+42 -4)
📝 crates/horizon-client/src/game/render_tick.rs (+50 -20)
📝 tools/port_map/client2-003.tsv (+2 -2)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3519

What

  • Frustum.getNearPlaneBounds: new camera::near_plane_bounds inverts projection * view (the culling projection setPerspective(fov, aspect, 0.05, depthFar, zZeroToOne)) over the NDC z = -1 corners and boxes them; the overlay test moves it to the eye like LevelExtractor.getViewBlockingState.
  • That test now calls BlockState.isViewBlocking: stairs and slabs (NEAR_PLANE_INTERSECTS_OUTLINE) block when a shape box intersects the near-plane box, snow only at 8 layers, everything else via its isSuffocating predicate (the cushion code's rule, now shared as Game::state_suffocating). The eight test points use vanilla's float maths. The old solid_render && full_collision guess is gone.

Vanilla followed: Frustum.getNearPlaneBounds, LevelExtractor.getViewBlockingState, BlockBehaviour.BlockStateBase.isViewBlocking, Blocks.NEAR_PLANE_INTERSECTS_OUTLINE.

Tests: camera::tests::near_plane_bounds_sit_half_a_near_distance_ahead_of_the_eye. Not run: game, parity harnesses (CI). View bobbing is not in the near-plane matrix.

🤖 Generated with Claude Code


🔄 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/4635 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/23-misc` --- ### 📝 Commits (1) - [`08918a8`](https://github.com/horizon-rust/horizon/commit/08918a8a7fe585a4ad6f80e75bd149a3d5c214f8) Show the view-blocking block overlay by BlockState.isViewBlocking against the near plane ### 📊 Changes **4 files changed** (+135 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/camera.rs` (+41 -0) 📝 `crates/horizon-client/src/game/cushions.rs` (+42 -4) 📝 `crates/horizon-client/src/game/render_tick.rs` (+50 -20) 📝 `tools/port_map/client2-003.tsv` (+2 -2) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3519 ## What - `Frustum.getNearPlaneBounds`: new `camera::near_plane_bounds` inverts projection * view (the culling projection `setPerspective(fov, aspect, 0.05, depthFar, zZeroToOne)`) over the NDC z = -1 corners and boxes them; the overlay test moves it to the eye like `LevelExtractor.getViewBlockingState`. - That test now calls `BlockState.isViewBlocking`: stairs and slabs (`NEAR_PLANE_INTERSECTS_OUTLINE`) block when a shape box intersects the near-plane box, `snow` only at 8 layers, everything else via its `isSuffocating` predicate (the cushion code's rule, now shared as `Game::state_suffocating`). The eight test points use vanilla's float maths. The old `solid_render && full_collision` guess is gone. Vanilla followed: `Frustum.getNearPlaneBounds`, `LevelExtractor.getViewBlockingState`, `BlockBehaviour.BlockStateBase.isViewBlocking`, `Blocks.NEAR_PLANE_INTERSECTS_OUTLINE`. Tests: `camera::tests::near_plane_bounds_sit_half_a_near_distance_ahead_of_the_eye`. Not run: game, parity harnesses (CI). View bobbing is not in the near-plane matrix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:41 +07:00
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#5743
No description provided.